2023-09-21 11:50:59 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
scriptDir=$(dirname "${BASH_SOURCE[0]}")
|
|
|
|
scriptName=$(basename "${BASH_SOURCE[0]}")
|
2023-11-11 12:04:18 +00:00
|
|
|
version="v1.55.2"
|
2023-09-21 11:50:59 +00:00
|
|
|
|
|
|
|
if [[ "$1" == "--install-deps" ]]
|
|
|
|
then
|
|
|
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$(go env GOPATH)/bin" "$version"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! which golangci-lint > /dev/null
|
|
|
|
then
|
|
|
|
echo "golangci-lint tool is not found, install it with:"
|
2023-11-04 11:11:15 +00:00
|
|
|
echo " make lint-deps"
|
2023-09-21 11:50:59 +00:00
|
|
|
echo "or follow https://golangci-lint.run/usage/install/"
|
2023-09-22 07:04:25 +00:00
|
|
|
exit 2
|
2023-09-21 11:50:59 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
golangci-lint run --config ./.golangci.yml
|