Skip to content

Commit bc08142

Browse files
committed
chore(Makefile): Adding fieldalignment
Signed-off-by: Vincent Boutour <bob@vibioh.fr>
1 parent 6bc149c commit bc08142

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,20 @@ init:
5050
@curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/main/bootstrap" | bash -s -- "-c" "git_hooks" "coverage" "release"
5151
go install "github.com/golangci/golangci-lint/cmd/golangci-lint@latest"
5252
go install "golang.org/x/tools/cmd/goimports@latest"
53+
go install "golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@master"
5354
go install "mvdan.cc/gofumpt@latest"
5455
go mod tidy
5556

5657
## format: Format code. e.g Prettier (js), format (golang)
5758
.PHONY: format
5859
format:
59-
goimports -w $(shell find . -name "*.go")
60-
gofumpt -w $(shell find . -name "*.go") 2>/dev/null
60+
$(shell find . -name "*.go" -exec goimports -w {} +)
61+
$(shell find . -name "*.go" -exec gofumpt -w {} +)
6162

6263
## style: Check lint, code styling rules. e.g. pylint, phpcs, eslint, style (java) etc ...
6364
.PHONY: style
6465
style:
66+
fieldalignment -test=false $(PACKAGES)
6567
golangci-lint run
6668

6769
## test: Shortcut to launch all the test tasks (unit, functional and integration).

0 commit comments

Comments
 (0)