diff --git a/Makefile b/Makefile index 330aca737..37834b344 100644 --- a/Makefile +++ b/Makefile @@ -29,12 +29,12 @@ test-e2e-release: build # Static analysis -verify: verify-fmt verify-bom verify-lint verify-dep +verify: verify-gofmt verify-bom verify-lint verify-dep verify-shellcheck verify-goword verify-govet verify-revive verify-license-header verify-receiver-name verify-mod-tidy verify-shellcheck verify-shellws verify-proto-annotations update: update-bom update-lint update-dep update-fix -.PHONY: verify-fmt -verify-fmt: - PASSES="fmt" ./scripts/test.sh +.PHONY: verify-gofmt +verify-gofmt: + PASSES="gofmt" ./scripts/test.sh .PHONY: verify-bom verify-bom: @@ -64,6 +64,43 @@ update-lint: update-fix: ./scripts/fix.sh +.PHONY: verify-shellcheck +verify-shellcheck: + PASSES="shellcheck" ./scripts/test.sh + +.PHONY: verify-goword +verify-goword: + PASSES="goword" ./scripts/test.sh + +.PHONY: verify-govet +verify-govet: + PASSES="govet" ./scripts/test.sh + +.PHONY: verify-revive +verify-revive: + PASSES="revive" ./scripts/test.sh + +.PHONY: verify-license-header +verify-license-header: + PASSES="license_header" ./scripts/test.sh + +.PHONY: verify-receiver-name +verify-receiver-name: + PASSES="receiver_name" ./scripts/test.sh + +.PHONY: verify-mod-tidy +verify-mod-tidy: + PASSES="mod_tidy" ./scripts/test.sh + +.PHONY: verify-shellws +verify-shellws: + PASSES="shellws" ./scripts/test.sh + +.PHONY: verify-proto-annotations +verify-proto-annotations: + PASSES="proto_annotations" ./scripts/test.sh + + # Cleanup clean: diff --git a/scripts/test.sh b/scripts/test.sh index 11c86056b..5754e828d 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -388,29 +388,6 @@ function cov_pass { ######### Code formatting checkers ############################################# -function fmt_pass { - toggle_failpoints disable - - # TODO: add "unparam","staticcheck", "unconvert", "ineffasign","nakedret" - # after resolving ore-existing errors. - # markdown_you - too sensitive check was temporarilly disbled. - for p in shellcheck \ - goword \ - gofmt \ - govet \ - revive \ - license_header \ - receiver_name \ - mod_tidy \ - dep \ - shellcheck \ - shellws \ - proto_annotations \ - ; do - run_pass "${p}" "${@}" - done -} - function shellcheck_pass { if tool_exists "shellcheck" "https://github.com/koalaman/shellcheck#installing"; then generic_checker run shellcheck -fgcc scripts/*.sh