Skip to content

Commit 8cd7b29

Browse files
committed
run linter for test files only
1 parent ca15161 commit 8cd7b29

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/paralleltest/paralleltest.go

+4
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ func (a *parallelAnalyzer) run(pass *analysis.Pass) (interface{}, error) {
222222

223223
inspector.Preorder(nodeFilter, func(node ast.Node) {
224224
funcDecl := node.(*ast.FuncDecl)
225+
// Only process _test.go files
226+
if !strings.HasSuffix(pass.Fset.File(funcDecl.Pos()).Name(), "_test.go") {
227+
return
228+
}
225229
a.analyzeTestFunction(pass, funcDecl)
226230
})
227231

0 commit comments

Comments
 (0)