Skip to content

Bump golangci-lint version in lefthook.yml

Adam Cohen requested to merge 450394-bump-golangci-version-in-lefthook-yml into master

What does this MR do?

In Upgrade golangci-lint from v1.50.1 to v1.60.3 (!401 - merged) • Adam Cohen • 17.5, I forgot to bump the version of golangci-lint in the lefthook.yml file, which is resulting in failures in the pre-push hook in gemnasium:

$ git clone git@gitlab.com:gitlab-org/security-products/analyzers/gemnasium.git && cd gemnasium
$ lefthook install
$ echo "some change" >> README.md
$ git commit -a -m 'some change'
$ lefthook run pre-push

┃  go-lint ❯

metadata/metadata.go:36:17: undeclared name: `report` (typecheck)
	IssueScanner = report.Scanner{

<snip>

metadata/metadata_test.go:17:11: undeclared name: `report` (typecheck)
		Vendor: report.Vendor{

summary: (done in 15.45 seconds)
✔️  go-mod-tidy
✔️  go-test
🥊  go-lint

The reason for this failure is because the pre-push hook is using golangci-lint:v1.50.1:

docker run --rm -it -w /app -v $(pwd):/app golangci/golangci-lint:v1.50.1 golangci-lint run \
  --verbose --config .git/info/lefthook-remotes/ci-templates/.golangci.yml

This MR updates the pre-push hook to use golangci-lint:v1.60.3 to fix this error.

What are the relevant issue numbers?

Upgrade GolangCI-Lint to latest version in Anal... (gitlab-org/gitlab#450394 - closed) • Adam Cohen • 17.5

Does this MR meet the acceptance criteria?

Merge request reports

Loading