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工具!