<commit_before>GO_TEST_COVERAGE_MODE ?= count
GO_TEST_COVERAGE_FILE_NAME ?= coverage.out
GOFMT_FLAGS ?= -s
GOLINT_MIN_CONFIDENCE ?= 0.3


.PHONY: all build
.PHONY: install install-deps
.PHONY: update-deps
.PHONY: test test-with-coverage test-with-coverage-formatted test-with-coverage-profile
.PHONY: clean vet


all: install-deps build install

build:
	go build -v ./...

install:
	go install ./...

install-deps:
	go get -d -t ./...

update-deps:
	go get -d -t -u ./...

test:
	go test -race -v ./...

test-with-coverage:
	go test -cover -race ./...

test-with-coverage-formatted:
	go test -cover -race ./... | column -t | sort -r

test-with-coverage-profile:
	echo "mode: ${GO_TEST_COVERAGE_MODE}" > ${GO_TEST_COVERAGE_FILE_NAME}
	for package in $$(go list ./...); do \
		go test -covermode ${GO_TEST_COVERAGE_MODE} -coverprofile "coverage_$${package##*/}.out" -race "$${package}"; \
		sed '1d' "coverage_$${package##*/}.out" >> ${GO_TEST_COVERAGE_FILE_NAME}; \
	done

clean:
	go clean -i -x ./...

vet:
	go vet ./...<commit_msg>add alias for publishing operation<commit_after>GO_TEST_COVERAGE_MODE ?= count
GO_TEST_COVERAGE_FILE_NAME ?= coverage.out
GOFMT_FLAGS ?= -s
GOLINT_MIN_CONFIDENCE ?= 0.3


.PHONY: all build
.PHONY: install install-deps
.PHONY: update-deps
.PHONY: test test-with-coverage test-with-coverage-formatted test-with-coverage-profile
.PHONY: clean vet


all: install-deps build install

build:
	go build -v ./...

install:
	go install ./...

install-deps:
	go get -d -t ./...

update-deps:
	go get -d -t -u ./...

test:
	go test -race -v ./...

test-with-coverage:
	go test -cover -race ./...

test-with-coverage-formatted:
	go test -cover -race ./... | column -t | sort -r

test-with-coverage-profile:
	echo "mode: ${GO_TEST_COVERAGE_MODE}" > ${GO_TEST_COVERAGE_FILE_NAME}
	for package in $$(go list ./...); do \
		go test -covermode ${GO_TEST_COVERAGE_MODE} -coverprofile "coverage_$${package##*/}.out" -race "$${package}"; \
		sed '1d' "coverage_$${package##*/}.out" >> ${GO_TEST_COVERAGE_FILE_NAME}; \
	done

clean:
	go clean -i -x ./...

vet:
	go vet ./...

publish:
	git push origin master --tags && git push mirror master --tags
{'fraction_non_alphanumeric': 0.174617878647522, 'fraction_numerical': 0.002779064381658175, 'mean_word_length': 3.098671726755218, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1472912', 'n_tokens_mistral': 880, 'n_tokens_neox': 861, 'n_words': 209}