File tree 3 files changed +2
-6
lines changed 3 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ type ExportedRule struct {
23
23
func (r * ExportedRule ) Apply (file * lint.File , args lint.Arguments ) []lint.Failure {
24
24
var failures []lint.Failure
25
25
26
- if isTest ( file ) {
26
+ if file . IsTest ( ) {
27
27
return failures
28
28
}
29
29
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ type PackageCommentsRule struct{}
20
20
func (r * PackageCommentsRule ) Apply (file * lint.File , _ lint.Arguments ) []lint.Failure {
21
21
var failures []lint.Failure
22
22
23
- if isTest ( file ) {
23
+ if file . IsTest ( ) {
24
24
return failures
25
25
}
26
26
Original file line number Diff line number Diff line change @@ -19,10 +19,6 @@ const styleGuideBase = "https://golang.org/wiki/CodeReviewComments"
19
19
// If id == nil, the answer is false.
20
20
func isBlank (id * ast.Ident ) bool { return id != nil && id .Name == "_" }
21
21
22
- func isTest (f * lint.File ) bool {
23
- return strings .HasSuffix (f .Name , "_test.go" )
24
- }
25
-
26
22
var commonMethods = map [string ]bool {
27
23
"Error" : true ,
28
24
"Read" : true ,
You can’t perform that action at this time.
0 commit comments