Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,25 @@ endef

IGNORED_PACKAGES := \
github.com/artefactual-sdps/preprocessing-base/hack/% \
github.com/artefactual-sdps/preprocessing-sfa/internal/enums
github.com/artefactual-sdps/preprocessing-base/internal/enums
PACKAGES := $(shell go list ./...)
TEST_PACKAGES := $(filter-out $(IGNORED_PACKAGES),$(PACKAGES))
TEST_IGNORED_PACKAGES := $(filter $(IGNORED_PACKAGES),$(PACKAGES))

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

deps: # @HELP List available module dependency updates.
deps: $(GOMAJOR)
gomajor list

env: # @HELP Print Go env variables.
env:
go env

deps: # @HELP List available module dependency updates.
deps: $(GOMAJOR)
gomajor list
fmt: # @HELP Format the project Go files with golangci-lint.
fmt: FMT_FLAGS ?=
fmt: $(GOLANGCI_LINT)
golangci-lint fmt $(FMT_FLAGS)

golines: # @HELP Run the golines formatter to fix long lines.
golines: GOLINES_OUT_MODE ?= write-output
Expand Down Expand Up @@ -89,14 +94,14 @@ lint: LINT_FLAGS ?= --timeout=5m --fix --output.text.colors
lint: $(GOLANGCI_LINT)
golangci-lint run $(LINT_FLAGS)

list-tested-packages: # @HELP Print a list of packages being tested.
list-tested-packages:
$(foreach PACKAGE,$(TEST_PACKAGES),@echo $(PACKAGE)$(NEWLINE))

list-ignored-packages: # @HELP Print a list of packages ignored in testing.
list-ignored-packages:
$(foreach PACKAGE,$(TEST_IGNORED_PACKAGES),@echo $(PACKAGE)$(NEWLINE))

list-tested-packages: # @HELP Print a list of packages being tested.
list-tested-packages:
$(foreach PACKAGE,$(TEST_PACKAGES),@echo $(PACKAGE)$(NEWLINE))

mod-tidy-check: # @HELP Check that mod files are tidy.
go mod tidy -diff

Expand Down
Loading