Skip to content

Commit 35fc7bd

Browse files
committed
Update Makefile
- Copy Makefile changes from preprocessing-sfa - Fix copy/paste error for "preprocessing-base/internal/enums" - Re-order targets alphabetically
1 parent 3ce8088 commit 35fc7bd

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

Makefile

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,25 @@ endef
4040

4141
IGNORED_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
4444
PACKAGES := $(shell go list ./...)
4545
TEST_PACKAGES := $(filter-out $(IGNORED_PACKAGES),$(PACKAGES))
4646
TEST_IGNORED_PACKAGES := $(filter $(IGNORED_PACKAGES),$(PACKAGES))
4747

4848
export PATH:=$(GOBIN):$(PATH)
4949

50+
deps: # @HELP List available module dependency updates.
51+
deps: $(GOMAJOR)
52+
gomajor list
53+
5054
env: # @HELP Print Go env variables.
5155
env:
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

5863
golines: # @HELP Run the golines formatter to fix long lines.
5964
golines: GOLINES_OUT_MODE ?= write-output
@@ -89,14 +94,14 @@ lint: LINT_FLAGS ?= --timeout=5m --fix --output.text.colors
8994
lint: $(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-
9697
list-ignored-packages: # @HELP Print a list of packages ignored in testing.
9798
list-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+
100105
mod-tidy-check: # @HELP Check that mod files are tidy.
101106
go mod tidy -diff
102107

0 commit comments

Comments
 (0)