go-tools
go-tools copied to clipboard
ST1020: ignore deprecation comment
As ST1020 is opt-in I would expect it to be ignored if the only comment on an exported function is a deprecation message:
% txtar-c .
-- foo.go --
package foo
// Deprecated: Use bar instead
func Foo() {
}
-- go.mod --
module x
go 1.21
% staticcheck -checks=ST1020 .
foo.go:3:1: comment on exported function Foo should be of the form "Foo ..." (ST1020)