feat: add fmt make target
Some checks failed
Setup Terraform / Terraform Versions (push) Has been cancelled
Some checks failed
Setup Terraform / Terraform Versions (push) Has been cancelled
This commit is contained in:
parent
9e053a1c5c
commit
b0ec4a7386
1 changed files with 5 additions and 1 deletions
6
Makefile
6
Makefile
|
@ -1,5 +1,5 @@
|
|||
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
|
||||
TEST?=./forgejo
|
||||
GOFMT_FILES?=$(shell find . -name '*.go' |grep -v vendor)
|
||||
GOFMT ?= gofmt -s
|
||||
ARCH?=$$(uname -m | sed 's/x86_64/amd64/g')
|
||||
KERNEL?=$$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||
|
@ -23,6 +23,10 @@ vet:
|
|||
exit 1; \
|
||||
fi
|
||||
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
$(GOFMT) -w $(GOFMT_FILES)
|
||||
|
||||
.PHONY: fmt-check
|
||||
fmt-check:
|
||||
@diff=$$($(GOFMT) -d $(GOFMT_FILES)); \
|
||||
|
|
Loading…
Add table
Reference in a new issue