mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
Provide a script to lint the whole working copy, and update make lint to use it
The script expects a golangci-lint binary in .bin; this makes it possible to install the exact same version that also runs on CI.
This commit is contained in:
2
Makefile
2
Makefile
@ -40,7 +40,7 @@ format:
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
golangci-lint run
|
||||
./scripts/lint.sh
|
||||
|
||||
# For more details about integration test, see https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md.
|
||||
.PHONY: integration-test-tui
|
||||
|
12
scripts/lint.sh
Executable file
12
scripts/lint.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ ! -x ./.bin/golangci-lint ]; then
|
||||
echo 'You need to install golangci-lint into .bin'
|
||||
echo 'One way to do this is to run'
|
||||
echo ' GOBIN=$(pwd)/.bin go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.2.1'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
./.bin/golangci-lint run
|
Reference in New Issue
Block a user