Closed tstromberg closed 2 years ago
The right incantation seems to be:
find . -name go.mod | xargs -n1 dirname | xargs -n1 -I{} sh -c "cd {} && golangci-lint run -c $(GOLINT_CONFIG)"
We can use that for projects that lack a top-level go.mod
file.
When run against
hook
,lint-install
creates a badMakefile
:That's because the Go modules live in two subdirectories:
What should the Makefile generator do then? Probably something like:
go.mod
golangci-lint -c ../.golangci.yaml