Pull request: scripts: imp linter scripts

Merge in DNS/adguard-home from imp-lint to master

Squashed commit of the following:

commit f5b5115a225431855798764770423209e03d6020
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Aug 23 17:57:59 2021 +0300

    scripts: imp linter scripts
This commit is contained in:
Ainar Garipov 2021-08-23 18:10:36 +03:00
parent b81030ba70
commit b92db25e6a
3 changed files with 9 additions and 3 deletions

View File

@ -4,6 +4,7 @@
package tools
import (
// Tools.
_ "github.com/fzipp/gocyclo/cmd/gocyclo"
_ "github.com/golangci/misspell/cmd/misspell"
_ "github.com/gordonklaus/ineffassign"

View File

@ -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.

View File

@ -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