Improve the `workhorse:verify` CI job use and performance
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 workhorse:verify
CI job by:
- Replacing https://github.com/golang/lint (which has been deprecated since May 2021) with https://github.com/golangci/golangci-lint
- Allowlisting known issues in an easy to read text file that can be updated as needed
- Improving performance by running ~30% faster (old: 3:38, new: 2:53)
- Updating golangci to 1.59.0
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
make lint
logic and performance
To test new $ time make lint ; echo $?
### Verify: lint
make lint 60.59s user 55.91s system 67% cpu 2:53.47 total
0
make lint
logic and performance
To verify against previous $ 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