diff --git a/scripts/lint.sh b/scripts/lint.sh index ed145f6e..826d4c5f 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -4,17 +4,18 @@ set -euo pipefail # Function to check if a command exists golangci_lint_installed() { - golangci-lint --version >/dev/null 2>&1 + golangci-lint --version >/dev/null 2>&1 } # Function to install golangci-lint on Ubuntu +# When the golangci-lint version is updated here, also update it in .github/workflows/ci.yml install_golangci_lint() { echo "Installing golangci-lint..." go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60 } # Check if golangci-lint is installed -if golangci_lint_installed ; then +if golangci_lint_installed; then echo "golangci-lint is already installed." else echo "golangci-lint is not installed."