Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run golangcl-lint in all go modules in repository #544

Closed
robert-zaremba opened this issue Aug 8, 2022 · 3 comments
Closed

Run golangcl-lint in all go modules in repository #544

robert-zaremba opened this issue Aug 8, 2022 · 3 comments
Labels
question Further information is requested

Comments

@robert-zaremba
Copy link

Locally I'm running the following command to lint all go modules in the repository:

find -name go.mod -execdir go run github.com/golangci/golangci-lint/cmd/golangci-lint run --timeout=5m \;

Can we add a support for that in golancl-lint? It's not dev-friendly to manually add a step and manually assign working directory for every module.

@ldez ldez added the question Further information is requested label Aug 9, 2022
@torkelrogstad
Copy link

If you're using Go workspaces, this works better. Assuming you have three modules foo, bar and qux, you can do golangci-lint run ./foo./... ./bar/... ./qux/..., or also golangci-lint run $(go list -m | awk 'NF{print $$0 "/..."}')

@weberc2
Copy link

weberc2 commented Apr 24, 2024

Yeah, this is causing me some pain too. Our repo has an arbitrary number of fine-grained Go modules, and it's painful to have to keep this action invocation in sync as modules are added, renamed, and deleted from our repository.

@ldez
Copy link
Member

ldez commented May 1, 2024

duplicate of #74

@ldez ldez closed this as completed May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants