commentstyle
is the linter to used to keep consistent comment styles.
go get -u github.com/yk2220s/commentstyle/cmd/commentstyle
need to build commentstyle
as plugin
go build -buildmode=plugin -o path/to/plugin github.com/yk2220s/commentstyle/plugin/commentstyle
add lines below to your .golangci.yml
linters
enable:
- commentstyle
linters-settings:
custom:
commentstyle:
path: path/to/plugin/commentstyle.so
each rule can be disabled with a flag.
default: true
any comment string should be an ascii character.
default: true
line-style (//-style) should be preferred than block-style (/*-style).