mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-27 14:11:04 +02:00
Makefile+github: add make fmt-check
to check for formatting
This commit is contained in:
4
Makefile
4
Makefile
@@ -258,6 +258,10 @@ fmt: $(GOIMPORTS_BIN)
|
||||
@$(call print, "Formatting source.")
|
||||
gofmt -l -w -s $(GOFILES_NOVENDOR)
|
||||
|
||||
fmt-check: fmt
|
||||
@$(call print, "Checking fmt results.")
|
||||
if test -n "$$(git status --porcelain)"; then echo "code not formatted correctly, please run `make fmt` again!"; git status; git diff; exit 1; fi
|
||||
|
||||
lint: docker-tools
|
||||
@$(call print, "Linting source.")
|
||||
$(DOCKER_TOOLS) golangci-lint run -v $(LINT_WORKERS)
|
||||
|
Reference in New Issue
Block a user