Skip to content

Commit f2e7225

Browse files
committed
Always use find -execdir for golangci-lint runs
There's not an overwhelming reason to avoid find for the single go module setup, it works as is for that case. By doing this it means that users won't have to remember to re-run lint-install if they go from 1 to >1 modules, which I doubt will happen if we keep them separate. Also, the less corner cases the better! Signed-off-by: Manuel Mendez <[email protected]>
1 parent cb49176 commit f2e7225

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

lint-install.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,6 @@ func goLintCmd(root string, level string, fix bool) string {
254254
}
255255

256256
klog.Infof("found %d modules within %s: %s", len(found), root, found)
257-
if len(found) == 0 || (len(found) == 1 && found[0] == strings.Trim(root, "/")) {
258-
return fmt.Sprintf("$(GOLANGCI_LINT_BIN) run%s", suffix)
259-
}
260-
261257
return fmt.Sprintf(`find . -name go.mod -execdir "$(GOLANGCI_LINT_BIN)" run -c "$(GOLINT_CONFIG)"%s \;`, suffix)
262258
}
263259

0 commit comments

Comments
 (0)