Don't lint names of interface methods.
They are often constrainted by the method names of concrete types,
so this check tends to have a high false positive rate.
diff --git a/lint.go b/lint.go
index f1b01d4..e256adf 100644
--- a/lint.go
+++ b/lint.go
@@ -351,11 +351,8 @@
}
}
case *ast.InterfaceType:
- for _, f := range v.Methods.List {
- for _, id := range f.Names {
- check(id, "interface method")
- }
- }
+ // Do not check interface method names.
+ // They are often constrainted by the method names of concrete types.
case *ast.RangeStmt:
if v.Tok == token.ASSIGN {
return true
diff --git a/testdata/names.go b/testdata/names.go
index 7c38be3..7774a8f 100644
--- a/testdata/names.go
+++ b/testdata/names.go
@@ -48,5 +48,5 @@
func (t *t_wow) g() (still_more string) {} // MATCH /underscore.*method result.*still_more/
type i interface {
- CheckHtmlPath() string // MATCH /interface method.*CheckHtmlPath.*CheckHTMLPath/
+ CheckHtml() string // okay; interface method names are often constrained by the concrete types' method names
}