Skip to content

Commit d8285de

Browse files
committed
Add staticcheck in make tests
Without this, people like myself will forget to run staticcheck. This fixes it by making it part of make tests, which will run with all the fast tests in CI. Signed-off-by: Jean-Philippe Evrard <open-source@a.spamming.party>
1 parent a682d8b commit d8285de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bootstrap-tools: $(HACKDIR)
1919
command -v $(HACKDIR)/cosign || curl -sSfL https://github.com/sigstore/cosign/releases/download/v2.2.3/cosign-linux-amd64 -o $(HACKDIR)/cosign
2020
command -v $(HACKDIR)/shellcheck || (curl -sSfL https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz | tar -J -v -x shellcheck-stable/shellcheck && mv shellcheck-stable/shellcheck $(HACKDIR)/shellcheck && rmdir shellcheck-stable)
2121
chmod +x $(HACKDIR)/goreleaser $(HACKDIR)/cosign $(HACKDIR)/syft $(HACKDIR)/shellcheck
22-
# go install honnef.co/go/tools/cmd/staticcheck@latest
22+
command -v staticcheck || go install honnef.co/go/tools/cmd/staticcheck@latest
2323

2424
clean:
2525
rm -rf ./dist
@@ -71,4 +71,4 @@ test: bootstrap-tools
7171
go test -test.short -json ./... > test.json
7272
echo "Running shellcheck"
7373
find . -name '*.sh' | xargs -n1 $(HACKDIR)/shellcheck
74-
# Need to add staticcheck to replace golint as golint is deprecated, and staticcheck is the recommendation
74+
staticcheck ./...

0 commit comments

Comments
 (0)