mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-12-14 18:51:34 +03:00
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:
parent
b81030ba70
commit
b92db25e6a
@ -4,6 +4,7 @@
|
||||
package tools
|
||||
|
||||
import (
|
||||
// Tools.
|
||||
_ "github.com/fzipp/gocyclo/cmd/gocyclo"
|
||||
_ "github.com/golangci/misspell/cmd/misspell"
|
||||
_ "github.com/gordonklaus/ineffassign"
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user