Skip to content

Commit 407af4c

Browse files
committed
chore: remove runOnPackage
1 parent 100ed3c commit 407af4c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

pkg/golinters/gocritic/gocritic.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ func (w *goCriticWrapper) run(pass *analysis.Pass) error {
113113

114114
linterCtx.SetPackageInfo(pass.TypesInfo, pass.Pkg)
115115

116-
runOnPackage(pass, enabledCheckers, pass.Files)
116+
for _, f := range pass.Files {
117+
runOnFile(pass, f, enabledCheckers)
118+
}
117119

118120
return nil
119121
}
@@ -195,12 +197,6 @@ func (w *goCriticWrapper) normalizeCheckerParamsValue(p any) any {
195197
}
196198
}
197199

198-
func runOnPackage(pass *analysis.Pass, checks []*gocriticlinter.Checker, files []*ast.File) {
199-
for _, f := range files {
200-
runOnFile(pass, f, checks)
201-
}
202-
}
203-
204200
func runOnFile(pass *analysis.Pass, f *ast.File, checks []*gocriticlinter.Checker) {
205201
for _, c := range checks {
206202
// All checkers are expected to use *lint.Context

0 commit comments

Comments
 (0)