diff --git a/internal/tools/tools.go b/internal/tools/tools.go index 7d875da1..214301bf 100644 --- a/internal/tools/tools.go +++ b/internal/tools/tools.go @@ -4,6 +4,7 @@ package tools import ( + // Tools. _ "github.com/fzipp/gocyclo/cmd/gocyclo" _ "github.com/golangci/misspell/cmd/misspell" _ "github.com/gordonklaus/ineffassign" diff --git a/scripts/make/go-lint.sh b/scripts/make/go-lint.sh index 81fcc706..0845acb3 100644 --- a/scripts/make/go-lint.sh +++ b/scripts/make/go-lint.sh @@ -49,9 +49,12 @@ trap not_found EXIT # Warnings +go_version="$( "$GO" version )" +readonly go_version + go_min_version='go1.16' go_version_msg=" -warning: your go version is different from the recommended minimal one (${go_min_version}). +warning: your go version (${go_version}) is different from the recommended minimal one (${go_min_version}). if you have the version installed, please set the GO environment variable. for example: @@ -59,7 +62,8 @@ for example: " readonly go_min_version go_version_msg -case "$( "$GO" version )" + +case "$go_version" in ('go version'*"$go_min_version"*) # Go on. diff --git a/scripts/make/txt-lint.sh b/scripts/make/txt-lint.sh index ab67d33a..aa959506 100644 --- a/scripts/make/txt-lint.sh +++ b/scripts/make/txt-lint.sh @@ -46,4 +46,5 @@ not_found() { } trap not_found EXIT -git ls-files -- '*.md' '*.yaml' '*.yml' | xargs misspell --error +git ls-files -- '*.md' '*.yaml' '*.yml' 'client/src/__locales/en.json'\ + | xargs misspell --error