
todocomment
finds TODO comment which doesn't include link to issue
example
package a
func f() {
// TODO: hoge <- NG
// TODO: hoge
// nolint: todocomment
// TODO: comment
// https://github.com/test/test/issues/
// comment
/* TODO github issue will be created */ <- NG
/*
TODO github issue will be created
nolint: todocomment
*/
}
// TODO is a stuct name
// nolint: todocomment
type TODO struct {
}
./a.go:4:2: todo comment must contains issue's link
./a.go:14:2: todo comment must contains issue's link
Install
% go get github.com/MakotoNaruse/todocomment/cmd/todocomment
Usage
% go vet -vettool=`which todocomment` [flag] pkgname
Flags:
--issue s must contain issue's link (ex. https://github.com/test/test/issues/)
Example
% go vet -vettool=$(which todocomment) --issue "github.com/MakotoNaruse/todocomment/issues" ./...
% go vet -vettool=$(which todocomment) --issue "trello.com/b/aaaaa/" main.go
% go vet -vettool=$(which todocomment) --issue "issue" ./src