<commit_before>DIR_GOMAKE:=$(dir $(lastword $(MAKEFILE_LIST)))

# output directory for test reports etc
DIR_OUT?=./out

include $(DIR_GOMAKE)/tools.mk

.PHONY: install
install::
	$(call PROMPT,$@)
	$(GO) install $(INSTALL_FLAGS) $(NO_VENDOR)

.PHONY: lint
lint: $(GOLANGCI_LINT)
	$(call PROMPT,$@)
	$(GOLANGCI_LINT) run

.PHONY: lint-full
lint-full: $(GOLANGCI_LINT)
	$(call PROMPT,$@)
	$(GOLANGCI_LINT) run --enable-all

.PHONY: lint-fast
lint-fast: $(GOLANGCI_LINT)
	$(call PROMPT,$@)
	$(GOLANGCI_LINT) run --fast

# wish this wasn't necessary
lint lint-fast lint-full: install

.PHONY: test test-full
test: test-full
test-full:
	$(call PROMPT,$@)
	GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) $(GO) test -v -race $(NO_VENDOR) $(TESTFLAGS)

.PHONY: test-short
test-short:
	$(call PROMPT,$@)
	GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) $(GO) test -v -short $(NO_VENDOR) $(TESTFLAGS)

.PHONY: coverage coverage-full
coverage: coverage-full
coverage-full: $(GOCOV) $(GOCOV_HTML) | $(DIR_OUT)
	$(call PROMPT,$@)
	GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) $(GOCOV) test -v -race $(NO_VENDOR) $(TESTFLAGS) > $(DIR_OUT)/coverage.json
	$(GOCOV_HTML) $(DIR_OUT)/coverage.json > $(DIR_OUT)/coverage.html
	$(GOCOV) report $(DIR_OUT)/coverage.json

.PHONY: coverage-short
coverage-short: $(GOCOV) $(GOCOV_HTML) | $(DIR_OUT)
	$(call PROMPT,$@)<commit_msg>Remove go install (#6)<commit_after>DIR_GOMAKE:=$(dir $(lastword $(MAKEFILE_LIST)))

# output directory for test reports etc
DIR_OUT?=./out

include $(DIR_GOMAKE)/tools.mk

.PHONY: install
install::
	$(call PROMPT,$@)
	$(GO) install $(INSTALL_FLAGS) $(NO_VENDOR)

.PHONY: lint
lint: $(GOLANGCI_LINT)
	$(call PROMPT,$@)
	$(GOLANGCI_LINT) run

.PHONY: lint-full
lint-full: $(GOLANGCI_LINT)
	$(call PROMPT,$@)
	$(GOLANGCI_LINT) run --enable-all

.PHONY: lint-fast
lint-fast: $(GOLANGCI_LINT)
	$(call PROMPT,$@)
	$(GOLANGCI_LINT) run --fast

.PHONY: test test-full
test: test-full
test-full:
	$(call PROMPT,$@)
	GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) $(GO) test -v -race $(NO_VENDOR) $(TESTFLAGS)

.PHONY: test-short
test-short:
	$(call PROMPT,$@)
	GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) $(GO) test -v -short $(NO_VENDOR) $(TESTFLAGS)

.PHONY: coverage coverage-full
coverage: coverage-full
coverage-full: $(GOCOV) $(GOCOV_HTML) | $(DIR_OUT)
	$(call PROMPT,$@)
	GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) $(GOCOV) test -v -race $(NO_VENDOR) $(TESTFLAGS) > $(DIR_OUT)/coverage.json
	$(GOCOV_HTML) $(DIR_OUT)/coverage.json > $(DIR_OUT)/coverage.html
	$(GOCOV) report $(DIR_OUT)/coverage.json

.PHONY: coverage-short
coverage-short: $(GOCOV) $(GOCOV_HTML) | $(DIR_OUT)
	$(call PROMPT,$@)
{'fraction_non_alphanumeric': 0.19530949634755862, 'fraction_numerical': 0.00038446751249519417, 'mean_word_length': 5.706185567010309, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2426214', 'n_tokens_mistral': 1124, 'n_tokens_neox': 1139, 'n_words': 230}