mirror of
https://github.com/safing/portmaster
synced 2025-04-21 19:39:09 +00:00
Always run golangci-lint, as the service is going offline
This commit is contained in:
parent
730501c3b1
commit
fceec09790
1 changed files with 11 additions and 19 deletions
30
test
30
test
|
@ -4,7 +4,6 @@ warnings=0
|
||||||
errors=0
|
errors=0
|
||||||
scripted=0
|
scripted=0
|
||||||
goUp="\\e[1A"
|
goUp="\\e[1A"
|
||||||
all=0
|
|
||||||
fullTestFlags="-short"
|
fullTestFlags="-short"
|
||||||
install=0
|
install=0
|
||||||
|
|
||||||
|
@ -99,7 +98,6 @@ while true; do
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
"all")
|
"all")
|
||||||
all=1
|
|
||||||
fullTestFlags=""
|
fullTestFlags=""
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
|
@ -119,10 +117,8 @@ if [[ $install -eq 1 ]]; then
|
||||||
echo "installing dependencies..."
|
echo "installing dependencies..."
|
||||||
echo "$ go get -u golang.org/x/lint/golint"
|
echo "$ go get -u golang.org/x/lint/golint"
|
||||||
go get -u golang.org/x/lint/golint
|
go get -u golang.org/x/lint/golint
|
||||||
if [[ $all -eq 1 ]]; then
|
echo "$ go get -u github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||||
echo "$ go get -u github.com/golangci/golangci-lint/cmd/golangci-lint"
|
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
|
||||||
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
|
|
||||||
fi
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -141,16 +137,14 @@ if [[ $(which golint) == "" ]]; then
|
||||||
echo "or run: ./test install"
|
echo "or run: ./test install"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [[ $all -eq 1 ]]; then
|
if [[ $(which golangci-lint) == "" ]]; then
|
||||||
if [[ $(which golangci-lint) == "" ]]; then
|
echo "golangci-lint command not found"
|
||||||
echo "golangci-lint command not found"
|
echo "install locally with: go get -u github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||||
echo "install locally with: go get -u github.com/golangci/golangci-lint/cmd/golangci-lint"
|
echo "or run: ./test install all"
|
||||||
echo "or run: ./test install all"
|
echo ""
|
||||||
echo ""
|
echo "hint: install for CI with: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin vX.Y.Z"
|
||||||
echo "hint: install for CI with: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin vX.Y.Z"
|
echo "don't forget to specify the version you want"
|
||||||
echo "don't forget to specify the version you want"
|
exit 1
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# target selection
|
# target selection
|
||||||
|
@ -179,9 +173,7 @@ for package in $packages; do
|
||||||
checkformat $package
|
checkformat $package
|
||||||
run golint -set_exit_status -min_confidence 1.0 $package
|
run golint -set_exit_status -min_confidence 1.0 $package
|
||||||
run go vet $package
|
run go vet $package
|
||||||
if [[ $all -eq 1 ]]; then
|
run golangci-lint run $GOPATH/src/$package
|
||||||
run golangci-lint run $GOPATH/src/$package
|
|
||||||
fi
|
|
||||||
run go test -cover $fullTestFlags $package
|
run go test -cover $fullTestFlags $package
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue