Skip to content

Commit b5aff13

Browse files
joshjmsserathius
andcommitted
makefile: Split fmt into separate verify commands
Manual backport of https://github.com/etcd-io/etcd/pull/14481/commits Co-authored-by: Marek Siarkowicz <siarkowicz@google.com> Signed-off-by: joshjms <joshjms1607@gmail.com>
1 parent 5977f0d commit b5aff13

File tree

2 files changed

+44
-25
lines changed

2 files changed

+44
-25
lines changed

Makefile

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -555,11 +555,51 @@ gofail-disable: install-gofail
555555
PASSES="toggle_failpoints" ./test
556556

557557
.PHONY: verify
558-
verify: verify-fmt verify-bom verify-dep verify-go-versions
558+
verify: verify-go-versions verify-gofmt verify-bom verify-dep verify-shellcheck verify-goword verify-govet verify-revive verify-license-header verify-receiver-name verify-mod-tidy verify-markdown-you verify-markdown-marker
559559

560-
.PHONY: verify-fmt
561-
verify-fmt:
562-
PASSES="fmt" ./test
560+
.PHONY: verify-shellcheck
561+
verify-shellcheck:
562+
PASSES="shellcheck" ./test
563+
564+
.PHONY: verify-markdown-you
565+
verify-markdown-you:
566+
PASSES="markdown_you" ./test
567+
568+
.PHONY: verify-markdown-marker
569+
verify-markdown-marker:
570+
PASSES="markdown_marker" ./test
571+
572+
.PHONY: verify-goword
573+
verify-goword:
574+
PASSES="goword" ./test
575+
576+
.PHONY: verify-gofmt
577+
verify-gofmt:
578+
PASSES="gofmt" ./test
579+
580+
.PHONY: verify-govet
581+
verify-govet:
582+
PASSES="govet" ./test
583+
584+
.PHONY: verify-revive
585+
verify-revive:
586+
PASSES="revive" ./test
587+
588+
.PHONY: verify-license-header
589+
verify-license-header:
590+
PASSES="license_header" ./test
591+
592+
.PHONY: verify-receiver-name
593+
verify-receiver-name:
594+
PASSES="receiver_name" ./test
595+
596+
.PHONY: verify-mod-tidy
597+
verify-mod-tidy:
598+
PASSES="mod_tidy" ./test
599+
600+
.PHONY: verify-commit-title
601+
verify-commit-title:
602+
PASSES="commit_title" ./test
563603

564604
.PHONY: verify-bom
565605
verify-bom:

test

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -705,27 +705,6 @@ function commit_title_pass {
705705
# tools gosimple,unused,staticheck,unconvert,ineffasign,nakedret
706706
# are not module-aware. See https://github.com/golang/go/issues/24661
707707
# The module-aware versions need to be used when they become available
708-
function fmt_pass {
709-
toggle_failpoints disable
710-
711-
# TODO: add "unparam"
712-
for p in shellcheck \
713-
markdown_you \
714-
markdown_marker \
715-
goword \
716-
gofmt \
717-
govet \
718-
revive \
719-
license_header \
720-
receiver_name \
721-
mod_tidy \
722-
commit_title \
723-
; do
724-
echo "'$p' started at $(date)"
725-
"${p}"_pass "$@"
726-
echo "'$p' completed at $(date)"
727-
done
728-
}
729708

730709
function bom_pass {
731710
if ! command -v license-bill-of-materials >/dev/null; then

0 commit comments

Comments
 (0)