Open
Description
(I've searched the issue tracker, but it seems that this has never been brought up. If I'm wrong, feel free to close.)
package main
import "fmt"
// NotT is a type.
type T struct {
// A is a field.
A int
// A is a field.
B int
}
func main() {
fmt.Println(T{})
}
staticcheck --version
staticcheck 2025.1 (0.6.0)
staticcheck --checks='*' ./main.go
-
Got:
main.go:5:1: comment on exported type T should be of the form "T ..." (with optional leading article) (ST1021)
-
Expected:
main.go:5:1: comment on exported type T should be of the form "T ..." (with optional leading article) (ST1021) main.go:10:2: comment on exported Field B should be of the form "B ..." (with optional leading article) (ST10XX)