Merge pull request #14481 from serathius/verify-fmt
makefile: Split fmt into separate verify commandsdependabot/go_modules/go.uber.org/atomic-1.10.0
commit
e0647b9d42
45
Makefile
45
Makefile
|
@ -29,12 +29,12 @@ test-e2e-release: build
|
||||||
|
|
||||||
# Static analysis
|
# 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
|
update: update-bom update-lint update-dep update-fix
|
||||||
|
|
||||||
.PHONY: verify-fmt
|
.PHONY: verify-gofmt
|
||||||
verify-fmt:
|
verify-gofmt:
|
||||||
PASSES="fmt" ./scripts/test.sh
|
PASSES="gofmt" ./scripts/test.sh
|
||||||
|
|
||||||
.PHONY: verify-bom
|
.PHONY: verify-bom
|
||||||
verify-bom:
|
verify-bom:
|
||||||
|
@ -64,6 +64,43 @@ update-lint:
|
||||||
update-fix:
|
update-fix:
|
||||||
./scripts/fix.sh
|
./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
|
# Cleanup
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -388,29 +388,6 @@ function cov_pass {
|
||||||
|
|
||||||
######### Code formatting checkers #############################################
|
######### 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 {
|
function shellcheck_pass {
|
||||||
if tool_exists "shellcheck" "https://github.com/koalaman/shellcheck#installing"; then
|
if tool_exists "shellcheck" "https://github.com/koalaman/shellcheck#installing"; then
|
||||||
generic_checker run shellcheck -fgcc scripts/*.sh
|
generic_checker run shellcheck -fgcc scripts/*.sh
|
||||||
|
|
Loading…
Reference in New Issue