cfmt
1.0.0
CFMT是將一定長度上的評論包裝到新線路的工具。
go get -u github.com/alexkohler/cfmt
注意:CFMT需要GOFMT。
與其他GO靜態Anaylsis工具(例如Golint,Go Vet)類似,可以使用一個或多個以其導入路徑命名的文件名,目錄或軟件包調用CFMT。 CFMT還支持...通配符。
cfmt [flags] files/directories/packages
cfmt只會打印將進行的更改,但不會修改輸入文件。 cfmt將把新線路包裹起來或適當地加入現有行。請參閱運行cfmt -m=100之前/之後的以下內容
前
// I am a long comment that is over 100 characters long. I should probably wrap to a new line.後
// I am a long comment that is over 100 characters long. I should probably wrap
// to a new line.前
// I am a long comment that is over 100 characters long. I should probably wrap below to the
// rest of the comment.後
// I am a long comment that is over 100 characters long. I should probably wrap
// below to the rest of the comment.前
//I am a long comment that starts without a space and is over 100 characters long. When I wrap, I should still start without a space後
//I am a long comment that starts without a space and is over 100 characters
//long. When I wrap, I should still start without a space cfmt忽略塊( /* */ )註釋和“分組”註釋,長度為10(即連續10多行,以//開頭)。
歡迎拉請求!
如果您喜歡CFMT,請查看我的其他靜態Anaylsis工具!