Skip to content

Commit a4ffe29

Browse files
committed
Install if not installed
1 parent 9560caf commit a4ffe29

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

script/lint

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22

33
set -eEuo pipefail
44

5-
# golangci-lint config file is .golangci.yaml
6-
# --out-format=json --print-issued-lines=false --print-linter-name=false
5+
# Install golangci-lint if not already installed
6+
if ! command -v golangci-lint &> /dev/null; then
7+
echo "golangci-lint not found, installing..."
8+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
9+
fi
10+
711
golangci-lint run "$@"
812

913

0 commit comments

Comments
 (0)