File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ package golinters
2
2
3
3
import (
4
4
"fmt"
5
- "go/ast"
6
- "strings"
7
5
"sync"
8
6
9
7
"github.com/yeya24/promlinter"
@@ -33,16 +31,7 @@ func NewPromlinter() *goanalysis.Linter {
33
31
disabledLinters := lintCtx .Cfg .LintersSettings .Promlinter .DisabledLinters
34
32
35
33
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 {
46
35
Strict : strict ,
47
36
DisabledLintFuncs : disabledLinters ,
48
37
})
You can’t perform that action at this time.
0 commit comments