Skip to content

Commit b94be81

Browse files
committed
remove test file check
Signed-off-by: yeya24 <[email protected]>
1 parent 13ae064 commit b94be81

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

pkg/golinters/promlinter.go

+1-12
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ package golinters
22

33
import (
44
"fmt"
5-
"go/ast"
6-
"strings"
75
"sync"
86

97
"github.com/yeya24/promlinter"
@@ -33,16 +31,7 @@ func NewPromlinter() *goanalysis.Linter {
3331
disabledLinters := lintCtx.Cfg.LintersSettings.Promlinter.DisabledLinters
3432

3533
analyzer.Run = func(pass *analysis.Pass) (interface{}, error) {
36-
files := make([]*ast.File, 0)
37-
38-
for _, f := range pass.Files {
39-
if strings.HasSuffix(pass.Fset.Position(f.Pos()).Filename, "_test.go") {
40-
continue
41-
}
42-
43-
files = append(files, f)
44-
}
45-
issues := promlinter.RunLint(pass.Fset, files, promlinter.Setting{
34+
issues := promlinter.RunLint(pass.Fset, pass.Files, promlinter.Setting{
4635
Strict: strict,
4736
DisabledLintFuncs: disabledLinters,
4837
})

0 commit comments

Comments
 (0)