@@ -40,20 +40,25 @@ endef
4040
4141IGNORED_PACKAGES := \
4242 github.com/artefactual-sdps/preprocessing-base/hack/% \
43- github.com/artefactual-sdps/preprocessing-sfa /internal/enums
43+ github.com/artefactual-sdps/preprocessing-base /internal/enums
4444PACKAGES := $(shell go list ./...)
4545TEST_PACKAGES := $(filter-out $(IGNORED_PACKAGES ) ,$(PACKAGES ) )
4646TEST_IGNORED_PACKAGES := $(filter $(IGNORED_PACKAGES ) ,$(PACKAGES ) )
4747
4848export PATH: =$(GOBIN ) :$(PATH )
4949
50+ deps : # @HELP List available module dependency updates.
51+ deps : $(GOMAJOR )
52+ gomajor list
53+
5054env : # @HELP Print Go env variables.
5155env :
5256 go env
5357
54- deps : # @HELP List available module dependency updates.
55- deps : $(GOMAJOR )
56- gomajor list
58+ fmt : # @HELP Format the project Go files with golangci-lint.
59+ fmt : FMT_FLAGS ?=
60+ fmt : $(GOLANGCI_LINT )
61+ golangci-lint fmt $(FMT_FLAGS )
5762
5863golines : # @HELP Run the golines formatter to fix long lines.
5964golines : GOLINES_OUT_MODE ?= write-output
@@ -89,14 +94,14 @@ lint: LINT_FLAGS ?= --timeout=5m --fix --output.text.colors
8994lint : $(GOLANGCI_LINT )
9095 golangci-lint run $(LINT_FLAGS )
9196
92- list-tested-packages : # @HELP Print a list of packages being tested.
93- list-tested-packages :
94- $(foreach PACKAGE,$(TEST_PACKAGES ) ,@echo $(PACKAGE )$(NEWLINE ) )
95-
9697list-ignored-packages : # @HELP Print a list of packages ignored in testing.
9798list-ignored-packages :
9899 $(foreach PACKAGE,$(TEST_IGNORED_PACKAGES ) ,@echo $(PACKAGE )$(NEWLINE ) )
99100
101+ list-tested-packages : # @HELP Print a list of packages being tested.
102+ list-tested-packages :
103+ $(foreach PACKAGE,$(TEST_PACKAGES ) ,@echo $(PACKAGE )$(NEWLINE ) )
104+
100105mod-tidy-check : # @HELP Check that mod files are tidy.
101106 go mod tidy -diff
102107
0 commit comments