Add format target to Makefile
This commit is contained in:
@@ -39,7 +39,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git status --porcelain
|
git status --porcelain
|
||||||
if [ -n "$(git status --porcelain)" ]; then
|
if [ -n "$(git status --porcelain)" ]; then
|
||||||
echo 'To fix this check, run "goimports -w $(find . -name '*.go' | grep -v '_gen.go$') && go mod tidy"'
|
echo 'To fix this check, run "make format" and commit the changes'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,12 @@ lintall: lint ##@Development Lint Go and JS code
|
|||||||
@(cd ./ui && npm run lint)
|
@(cd ./ui && npm run lint)
|
||||||
.PHONY: lintall
|
.PHONY: lintall
|
||||||
|
|
||||||
|
format: ##@Development Format code
|
||||||
|
@(cd ./ui && npm run prettier)
|
||||||
|
@go run golang.org/x/tools/cmd/goimports -w `find . -name '*.go' | grep -v '_gen.go$''`
|
||||||
|
@go mod tidy
|
||||||
|
.PHONY: format
|
||||||
|
|
||||||
wire: check_go_env ##@Development Update Dependency Injection
|
wire: check_go_env ##@Development Update Dependency Injection
|
||||||
go run github.com/google/wire/cmd/wire@latest ./...
|
go run github.com/google/wire/cmd/wire@latest ./...
|
||||||
.PHONY: wire
|
.PHONY: wire
|
||||||
|
|||||||
Vendored
-1
@@ -1 +0,0 @@
|
|||||||
INVALID
|
|
||||||
Reference in New Issue
Block a user