chore: add make fmt target
This commit is contained in:
parent
68cf7a2173
commit
b1e0d5b39f
8
Makefile
8
Makefile
|
@ -35,7 +35,7 @@ GOLANGCI_LINT = $(BIN)/golangci-lint
|
||||||
$(BIN)/golangci-lint: PACKAGE=github.com/golangci/golangci-lint/cmd/golangci-lint@v1.41.1
|
$(BIN)/golangci-lint: PACKAGE=github.com/golangci/golangci-lint/cmd/golangci-lint@v1.41.1
|
||||||
|
|
||||||
GOIMPORTS = $(BIN)/goimports
|
GOIMPORTS = $(BIN)/goimports
|
||||||
$(BIN)/goimports: PACKAGE=golang.org/x/tools/cmd/goimports@v0.1.5
|
$(BIN)/goimports: PACKAGE=golang.org/x/tools/cmd/goimports@v0.1.8
|
||||||
|
|
||||||
## build: Build
|
## build: Build
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
|
@ -76,13 +76,17 @@ lint-frontend: | ; $(info $(M) running frontend linters…)
|
||||||
## lint-backend: Lint backend
|
## lint-backend: Lint backend
|
||||||
.PHONY: lint-backend
|
.PHONY: lint-backend
|
||||||
lint-backend: | $(GOLANGCI_LINT) ; $(info $(M) running backend linters…)
|
lint-backend: | $(GOLANGCI_LINT) ; $(info $(M) running backend linters…)
|
||||||
$Q $(GOLANGCI_LINT) run
|
$Q $(GOLANGCI_LINT) run -v
|
||||||
|
|
||||||
## lint-commits: Lint commits
|
## lint-commits: Lint commits
|
||||||
.PHONY: lint-commits
|
.PHONY: lint-commits
|
||||||
lint-commits: | ; $(info $(M) running commitlint…)
|
lint-commits: | ; $(info $(M) running commitlint…)
|
||||||
$Q ./scripts/commitlint.sh
|
$Q ./scripts/commitlint.sh
|
||||||
|
|
||||||
|
## fmt: Format source files
|
||||||
|
fmt: $(GOIMPORTS)
|
||||||
|
$Q $(GOIMPORTS) -local $(MODULE) -w $$(find . -type f -name '*.go' -not -path "./vendor/*")
|
||||||
|
|
||||||
## bump-version: Bump app version
|
## bump-version: Bump app version
|
||||||
.PHONY: bump-version
|
.PHONY: bump-version
|
||||||
bump-version: | ; $(info $(M) creating a new release…)
|
bump-version: | ; $(info $(M) creating a new release…)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !dev
|
||||||
// +build !dev
|
// +build !dev
|
||||||
|
|
||||||
package frontend
|
package frontend
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build dev
|
||||||
// +build dev
|
// +build dev
|
||||||
|
|
||||||
package frontend
|
package frontend
|
||||||
|
|
Loading…
Reference in New Issue