mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #14481 from serathius/verify-fmt
makefile: Split fmt into separate verify commands
This commit is contained in:
commit
e0647b9d42
45
Makefile
45
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:
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user