Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ install-tools:
go install golang.org/x/tools/cmd/stringer

# linting
go install golang.org/x/lint/golint@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/kisielk/errcheck@latest

# code coverage
Expand Down
5 changes: 3 additions & 2 deletions scripts/ci/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
if [ -z ${PKG+x} ]; then echo "PKG is not set"; exit 1; fi
if [ -z ${ROOT_DIR+x} ]; then echo "ROOT_DIR is not set"; exit 1; fi

echo "golint:"
OUT=$(golint $PKG/... 2>&1 | grep --invert-match -E "(/example)")
# SA1019 (deprecated API) is suppressed until the go/loader -> go/packages migration is done.
echo "staticcheck:"
OUT=$(staticcheck -checks=all,-SA1019 $PKG/... 2>&1 | grep --invert-match -E "(/example)")
if [ -n "$OUT" ]; then echo "$OUT"; PROBLEM=1; fi

if [ -n "$PROBLEM" ]; then exit 1; fi