From 739c438bffdac792d60b464db38e59e02975a677 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Fri, 28 Jun 2024 13:42:29 +0300 Subject: [PATCH] Fixed linter workflow --- .github/run-tests.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/run-tests.sh b/.github/run-tests.sh index 4c762de..1cb6f99 100755 --- a/.github/run-tests.sh +++ b/.github/run-tests.sh @@ -1,10 +1,17 @@ #!/bin/sh - -# Install tools to test our code-quality -go get -u golang.org/x/lint/golint -go get -u golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow -go get -u honnef.co/go/tools/cmd/staticcheck +# Install the tools we use to test our code-quality. +# +# Here we setup the tools to install only if the "CI" environmental variable +# is not empty. This is because locally I have them installed. +# +# NOTE: Github Actions always set CI=true +# +if [ ! -z "${CI}" ] ; then + go install golang.org/x/lint/golint@latest + go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest + go install honnef.co/go/tools/cmd/staticcheck@latest +fi # Run the static-check tool.