generated from ViBiOh/goweb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Makefile): Adding fieldalignment
Signed-off-by: Vincent Boutour <[email protected]>
- Loading branch information
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,18 +58,20 @@ init: | |
go install "github.com/golang/mock/[email protected]" | ||
go install "github.com/golangci/golangci-lint/cmd/golangci-lint@latest" | ||
go install "golang.org/x/tools/cmd/goimports@latest" | ||
go install "golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@master" | ||
go install "mvdan.cc/gofumpt@latest" | ||
go mod tidy | ||
|
||
## format: Format code. e.g Prettier (js), format (golang) | ||
.PHONY: format | ||
format: | ||
goimports -w $(shell find . -name "*.go") | ||
gofumpt -w $(shell find . -name "*.go") 2>/dev/null | ||
$(shell find . -name "*.go" -exec goimports -w {} +) | ||
$(shell find . -name "*.go" -exec gofumpt -w {} +) | ||
|
||
## style: Check lint, code styling rules. e.g. pylint, phpcs, eslint, style (java) etc ... | ||
.PHONY: style | ||
style: | ||
fieldalignment -test=false $(PACKAGES) | ||
golangci-lint run | ||
|
||
## mocks: Generate mocks | ||
|