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 2f37cc3 commit 182f6e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,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
2 changes: 1 addition & 1 deletion pkg/provider/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ type Event struct {
Metadata map[string]string `json:"metadata,omitempty"`
URL string `json:"url,omitempty"`
ShareableURL string `json:"shareable_url,omitempty"`
TraceLink trace.Link `json:"-"`
Item absto.Item `json:"item"`
Type EventType `json:"type"`
TraceLink trace.Link `json:"-"`
}

// IsForcedFor check if event is forced for given key
Expand Down

0 comments on commit 182f6e2

Please sign in to comment.