Skip to content

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented May 7, 2025

golangci-lint uses a copy of staticcheck rules, which leads to funky differences between what staticcheck reports locally and what golangci-lint reports. This is annoying, and the real staticcheck is of higher quality than golangci-lint. Use it in CI instead of the copy.

@lmb lmb force-pushed the ci-staticcheck branch 2 times, most recently from 7b954fb to d2a81c5 Compare May 7, 2025 10:53
@lmb
Copy link
Collaborator Author

lmb commented May 7, 2025

@ti-mo staticcheck is kind of slow, 20s for every run. How about I drop the darwin cross build? I don't think it adds much since we now do the wasm build.

@ti-mo
Copy link
Collaborator

ti-mo commented May 7, 2025

@ti-mo staticcheck is kind of slow, 20s for every run. How about I drop the darwin cross build? I don't think it adds much since we now do the wasm build.

I'm not sure if that's necessarily true. Take an old run, for example: https://github.com/cilium/ebpf/actions/runs/14728073480/job/41335459778?pr=1764. golangci-lint takes 12s there, while it takes 4s in this PR. Clearly, running staticcheck (or golangci-lint) warms up a cache somewhere.

Since Build and Lint is in the critical path, I'd suggest we move the cross-builds out into a separate job that kicks off in parallel together with the Run tests jobs. That way, the test matrix won't take as long to start, and we'll save more time overall.

lmb added 2 commits May 7, 2025 15:43
golangci-lint uses a copy of staticcheck rules, which leads to funky
differences between what staticcheck reports locally and what
golangci-lint reports. This is annoying, and the real staticcheck
is of higher quality than golangci-lint. Use it in CI instead
of the copy.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
@lmb lmb force-pushed the ci-staticcheck branch from d2a81c5 to 43a7cf6 Compare May 7, 2025 14:48
@lmb lmb marked this pull request as ready for review May 7, 2025 15:36
@lmb lmb requested a review from a team as a code owner May 7, 2025 15:36
@lmb lmb merged commit f67e84b into cilium:main May 7, 2025
32 of 33 checks passed
@lmb lmb deleted the ci-staticcheck branch May 7, 2025 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants