diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b6cbcd52..7f431fca9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -170,6 +170,7 @@ jobs: - name: Lint uses: golangci/golangci-lint-action@v8 with: + # If you change this, make sure to also update scripts/golangci-lint-shim.sh version: v2.2.1 - name: errors run: golangci-lint run diff --git a/.vscode/settings.json b/.vscode/settings.json index 23a0e524b..dd4398af9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -23,7 +23,7 @@ }, }, "go.alternateTools": { - "golangci-lint-v2": "${workspaceFolder}/.bin/golangci-lint", + "golangci-lint-v2": "${workspaceFolder}/scripts/golangci-lint-shim.sh", }, "go.lintTool": "golangci-lint-v2", } diff --git a/Makefile b/Makefile index f972100a1..38dc118cb 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ format: .PHONY: lint lint: - ./scripts/lint.sh + ./scripts/golangci-lint-shim.sh run # For more details about integration test, see https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md. .PHONY: integration-test-tui diff --git a/scripts/golangci-lint-shim.sh b/scripts/golangci-lint-shim.sh new file mode 100755 index 000000000..24e32ac85 --- /dev/null +++ b/scripts/golangci-lint-shim.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +# Must be kept in sync with the version in .github/workflows/ci.yml +version="v2.2.1" + +go run "github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$version" "$@"