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

vet.sh: linting ineffective in CI #9784

Open
egonelbre opened this issue Apr 16, 2024 · 2 comments
Open

vet.sh: linting ineffective in CI #9784

egonelbre opened this issue Apr 16, 2024 · 2 comments
Assignees
Labels
triage me I really want to be triaged.

Comments

@egonelbre
Copy link
Contributor

egonelbre commented Apr 16, 2024

While looking at the #9758 it seems that linting is actually not working for modules. For example, copying locks should have definitely triggered a CI failure, which it did not.

Most go tools work in a single module boundary and should be executed at every root of go.mod. So, either the script or workflow needs fixing. From github actions output it would probably nice if every single module ended up as a separate result to make the distinction clearer. This probably can even be scoped, such that only changes in a particular module are linted.

Similarly, golang.org/x/lint/golint is deprecated and should be replaced with go vet. See the notice on https://pkg.go.dev/golang.org/x/lint.

The fix for making linting work again is trivial, but it needs a coordinated effort to get all the submodules passing the checks.

@egonelbre egonelbre added the triage me I really want to be triaged. label Apr 16, 2024
@egonelbre
Copy link
Contributor Author

egonelbre commented Apr 16, 2024

I created an proof-of-concept alternative script in egonelbre#1 -- you probably would need to adjust it to fit Google's needs, but it shows how to run go vet, staticcheck modules in parallel and get a nice output in github.

@egonelbre
Copy link
Contributor Author

I should probably mention that issues such as #10067 go unnoticed as a result. These can be easily caught by static linting tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants