CONTRIBUTING.md: linter section links to removed .golangci.yml
The "Running the linter" section in CONTRIBUTING.md is out of date since #6380 moved the lint config to grafana/k6-ci.
It currently says:
The actual version you can find in our
.golangci.yml. To run it locally, first install it, then run:make lint
Two things are off:
- The
.golangci.ymllink returns a 404. That file was removed in #6380 and the repo now only has.golangci.patch. - You don't need to install golangci-lint anymore.
make lintdownloads the base config from grafana/k6-ci intobuild/lint/, applies.golangci.patch, and runsgo run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@<version>, with the version taken from the first line of that base config (currentlyv2.13.2). I ran it locally without golangci-lint installed and it worked.
So someone following the guide hits a dead link, and may install a golangci-lint version that doesn't match what CI uses.
Suggested wording:
We use golangci-lint to lint the code in CI. The config comes from grafana/k6-ci, with k6-specific changes in
.golangci.patch. To run it locally with the same version as CI:make lintIf you need to change the lint config, edit
build/lint/.golangci.ymlafter runningmake lint, then runmake update-lint-patchto regenerate the patch.
I can open a PR for this.
Source: grafana/k6