Skip to content

Commit 3ddc48c

Browse files
committed
Makefile: update Makefile
1 parent 5d3981b commit 3ddc48c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,31 @@ coverage/gojay: coverage
8181
.PHONY: lint
8282
lint: fmt lint/golangci-lint ## Run all linters.
8383

84+
.PHONY: lint
85+
lint/gojay: fmt/gojay lint/golangci-lint/gojay
86+
8487
.PHONY: fmt
8588
fmt: tools/goimports tools/gofumpt ## Run goimports and gofumpt.
8689
$(call target)
8790
find . -iname "*.go" -not -path "./vendor/**" | xargs -P ${JOBS} ${TOOLS_BIN}/goimports -local=${PKG},$(subst /protocol,,$(PKG)) -w
8891
find . -iname "*.go" -not -path "./vendor/**" | xargs -P ${JOBS} ${TOOLS_BIN}/gofumpt -s -extra -w
8992

93+
.PHONY: fmt/gojay
94+
fmt/gojay: tools/goimports tools/gofumpt
95+
$(call target)
96+
@export GOFLAGS=-tags=gojay
97+
find . -iname "*.go" -not -path "./vendor/**" | xargs -P ${JOBS} ${TOOLS_BIN}/goimports -local=${PKG},$(subst /protocol,,$(PKG)) -w
98+
find . -iname "*.go" -not -path "./vendor/**" | xargs -P ${JOBS} ${TOOLS_BIN}/gofumpt -s -extra -w
99+
90100
.PHONY: lint/golangci-lint
91101
lint/golangci-lint: tools/golangci-lint .golangci.yml ## Run golangci-lint.
92102
$(call target)
93103
${TOOLS_BIN}/golangci-lint -j ${JOBS} run $(strip ${GO_LINT_FLAGS}) ./...
94104

105+
.PHONY: lint/golangci-lint/gojay
106+
lint/golangci-lint/gojay: GO_LINT_FLAGS+=--build-tags=gojay
107+
lint/golangci-lint/gojay: lint/golangci-lint
108+
95109

96110
##@ tools
97111

0 commit comments

Comments
 (0)