Skip to content

Commit

Permalink
chore(Makefile): Adding fieldalignment
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Oct 30, 2022
1 parent f88b3cc commit b225c1b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b225c1b

Please sign in to comment.