Skip to content

Commit

Permalink
Add golangci-lint to verify in Makefile
Browse files Browse the repository at this point in the history
Add golangci-lint to verify in Makefile so common mistakes are caught in
 presubmit PRs.

Signed-off-by: Bryan Cox <brcox@redhat.com>
  • Loading branch information
bryan-cox committed Sep 17, 2024
1 parent 67b580c commit fa5183c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,13 @@ build: hypershift-operator control-plane-operator control-plane-pki-operator hyp
.PHONY: update
update: api-deps api api-docs deps clients

.PHONY: golang-lint
golang-lint:
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.61.0
golangci-lint run

.PHONY: verify
verify: update staticcheck fmt vet
verify: update staticcheck fmt vet golang-lint
git diff-index --cached --quiet --ignore-submodules HEAD --
git diff-files --quiet --ignore-submodules
git diff --exit-code HEAD --
Expand Down

0 comments on commit fa5183c

Please sign in to comment.