pubfncomment is analyzer that detects a function which has no comment.
Instruction
go install github.com/sivchari/pubfncomment/cmd/pubfncomment
Usage
package a
func ok() {}
// OK is a function
func OK() {}
func NG() {}
go vet -vettool=(which pubfncomment) ./...
# a
./main_test.go:11:2: public function (NG) should have comment
CI
GitHub Actions
- name: install pubfncomment
run: go install github.com/sivchari/pubfncomment/cmd/pubfncomment
- name: run tenv
run: go vet -vettool=`which pubfncomment` ./...