We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13ae064 commit b94be81Copy full SHA for b94be81
pkg/golinters/promlinter.go
@@ -2,8 +2,6 @@ package golinters
2
3
import (
4
"fmt"
5
- "go/ast"
6
- "strings"
7
"sync"
8
9
"github.com/yeya24/promlinter"
@@ -33,16 +31,7 @@ func NewPromlinter() *goanalysis.Linter {
33
31
disabledLinters := lintCtx.Cfg.LintersSettings.Promlinter.DisabledLinters
34
32
35
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{
+ issues := promlinter.RunLint(pass.Fset, pass.Files, promlinter.Setting{
46
Strict: strict,
47
DisabledLintFuncs: disabledLinters,
48
})
0 commit comments