зеркало из https://github.com/Azure/ARO-RP.git
44e1c425d7 | ||
---|---|---|
.. | ||
.gitignore | ||
.golangci.yml | ||
.goreleaser.yml | ||
LICENSE | ||
Makefile | ||
README.md | ||
go.mod | ||
godot.go |
README.md
godot
Linter that checks if all top-level comments contain a period at the end of the last sentence if needed.
CodeReviewComments quote:
Comments should begin with the name of the thing being described and end in a period
Install
NOTE: Godot is available as a part of GolangCI Lint (disabled by default).
Build from source
go get -u github.com/tetafro/godot/cmd/godot
or download binary from releases page.
Run
godot ./myproject
Autofix flags are also available
godot -f ./myproject # fix issues and print the result
godot -w ./myproject # fix issues and replace the original file
Examples
Code
package math
// Sum sums two integers
func Sum(a, b int) int {
return a + b // result
}
Output
Top level comment should end in a period: math/math.go:3:1
See more examples in test files: