We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
fmt-check
1 parent 96955d7 commit 599e730Copy full SHA for 599e730
Makefile
@@ -115,6 +115,11 @@ fmt: $(GOIMPORTS_BIN)
115
@$(call print, "Formatting source.")
116
gofmt -l -w -s $(GOFILES_NOVENDOR)
117
118
+#? fmt-check: Make sure source code is formatted and imports are correct
119
+fmt-check: fmt
120
+ @$(call print, "Checking fmt results.")
121
+ if test -n "$$(git status --porcelain)"; then echo "code not formatted correctly, please run `make fmt` again!"; git status; git diff; exit 1; fi
122
+
123
#? lint: Lint source
124
lint: $(LINT_BIN)
125
@$(call print, "Linting source.")
@@ -142,6 +147,7 @@ tidy-module-check: tidy-module
142
147
unit-cover \
143
148
unit-race \
144
149
fmt \
150
+ fmt-check \
145
151
lint \
146
152
clean
153
0 commit comments