Skip to content

Improve the `workhorse:verify` CI job use and performance

Ash McKenzie requested to merge ashmckenzie/fix-linting-situation into master

What does this MR do and why?

While testing some Renovate MRs locally, I noticed make lint was taking a long time to run and so I set it out to fix it 🙂 This MR aims to improve the workhorse:verify CI job by:

Another benefit of using golangci is that it will cache locally, which should make local dev more efficient.

Closes: Run `golangci` script in Workhorse CI (#438545 - closed)

How to set up and validate locally

To test new make lint logic and performance

$ time make lint ; echo $?
### Verify: lint
make lint  60.59s user 55.91s system 67% cpu 2:53.47 total
0

To verify against previous make lint logic and performance

$ go install golang.org/x/lint/golint
$ time golint ./... | grep -Ev 'should have|should be|use ALL_CAPS in Go names'
golint ./...  90.94s user 151.71s system 111% cpu 3:38.14 total
grep -Ev 'should have|should be|use ALL_CAPS in Go names'  0.00s user 0.00s system 0% cpu 3:38.14 total
Edited by Ash McKenzie

Merge request reports