mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2026-02-26 12:47:29 +01:00
Add modernize tool to Makefile
This commit is contained in:
5
Makefile
5
Makefile
@@ -61,7 +61,7 @@ fmt:
|
|||||||
# gofumpt <https://github.com/mvdan/gofumpt>:
|
# gofumpt <https://github.com/mvdan/gofumpt>:
|
||||||
# Enforce a stricter format than gofmt
|
# Enforce a stricter format than gofmt
|
||||||
.PHONY: gofumpt
|
.PHONY: gofumpt
|
||||||
fmt:
|
gofumpt:
|
||||||
$(GOBIN) install mvdan.cc/gofumpt@latest
|
$(GOBIN) install mvdan.cc/gofumpt@latest
|
||||||
gofumpt -w $(GOSRC_COLLECTORS)
|
gofumpt -w $(GOSRC_COLLECTORS)
|
||||||
gofumpt -w $(GOSRC_SINKS)
|
gofumpt -w $(GOSRC_SINKS)
|
||||||
@@ -75,6 +75,9 @@ fmt:
|
|||||||
vet:
|
vet:
|
||||||
$(GOBIN) vet ./...
|
$(GOBIN) vet ./...
|
||||||
|
|
||||||
|
.PHONY: modernize
|
||||||
|
modernize:
|
||||||
|
$(GOBIN) run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest ./...
|
||||||
|
|
||||||
# Run linter for the Go programming language.
|
# Run linter for the Go programming language.
|
||||||
# Using static analysis, it finds bugs and performance issues, offers simplifications, and enforces style rules
|
# Using static analysis, it finds bugs and performance issues, offers simplifications, and enforces style rules
|
||||||
|
|||||||
Reference in New Issue
Block a user