<commit_before>.PHONY: default
default: deps checkgofmt vet predeclared staticcheck unused ineffassign golint test

.PHONY: deps
deps:
	go get -d -v -t ./

.PHONY: updatedeps
updatedeps:
	go get -d -v -t -u -f ./

.PHONY: install
install:
	go install ./

.PHONY: checkgofmt
checkgofmt:
	@echo gofmt -s -l .
	@if [ -n "$$(go version | awk '{ print $$3 }' | grep -v devel)" ]; then \
		output="$$(gofmt -s -l .)" ; \
		if [ -n "$$output"  ]; then \
		    echo "$$output"; \
			echo "Run gofmt on the above files!"; \
			exit 1; \
		fi; \
	fi

.PHONY: vet
vet:
	go vet ./

.PHONY: staticcheck
staticcheck:
	@if [ -n "$$(go version | awk '{ print $$3 }' | grep -v devel)" ]; then \
		go get honnef.co/go/tools/cmd/staticcheck; \
		echo staticcheck ./; \
		staticcheck ./; \
	fi

.PHONY: unused
unused:
	@go get honnef.co/go/tools/cmd/unused
	unused ./

.PHONY: ineffassign
ineffassign:
	@go get github.com/gordonklaus/ineffassign
	ineffassign .

.PHONY: predeclared
predeclared:
	@go get github.com/nishanths/predeclared
	predeclared .

# Intentionally omitted from CI, but target here for ad-hoc reports.
.PHONY: golint
golint:
	@go get github.com/golang/lint/golint
	golint -min_confidence 0.9 -set_exit_status ./

# Intentionally omitted from CI, but target here for ad-hoc reports.
.PHONY: errcheck
errcheck:
	@go get github.com/kisielk/errcheck
	errcheck ./

.PHONY: test
test:
	go test -cover -race ./...

.PHONY: generate
generate:
	go generate ./

.PHONY: testcover
testcover:
	@echo go test -race -covermode=atomic ./...
	@echo "mode: atomic" > coverage.out<commit_msg>other checks should examine any sub-packages<commit_after>.PHONY: default
default: deps checkgofmt vet predeclared staticcheck unused ineffassign golint test

.PHONY: deps
deps:
	go get -d -v -t ./...

.PHONY: updatedeps
updatedeps:
	go get -d -v -t -u -f ./...

.PHONY: install
install:
	go install ./...

.PHONY: checkgofmt
checkgofmt:
	@echo gofmt -s -l .
	@if [ -n "$$(go version | awk '{ print $$3 }' | grep -v devel)" ]; then \
		output="$$(gofmt -s -l .)" ; \
		if [ -n "$$output"  ]; then \
		    echo "$$output"; \
			echo "Run gofmt on the above files!"; \
			exit 1; \
		fi; \
	fi

.PHONY: vet
vet:
	go vet ./...

.PHONY: staticcheck
staticcheck:
	@if [ -n "$$(go version | awk '{ print $$3 }' | grep -v devel)" ]; then \
		go get honnef.co/go/tools/cmd/staticcheck; \
		echo staticcheck ./...; \
		staticcheck ./...; \
	fi

.PHONY: unused
unused:
	@go get honnef.co/go/tools/cmd/unused
	unused ./...

.PHONY: ineffassign
ineffassign:
	@go get github.com/gordonklaus/ineffassign
	ineffassign .

.PHONY: predeclared
predeclared:
	@go get github.com/nishanths/predeclared
	predeclared .

# Intentionally omitted from CI, but target here for ad-hoc reports.
.PHONY: golint
golint:
	@go get github.com/golang/lint/golint
	golint -min_confidence 0.9 -set_exit_status ./

# Intentionally omitted from CI, but target here for ad-hoc reports.
.PHONY: errcheck
errcheck:
	@go get github.com/kisielk/errcheck
	errcheck ./

.PHONY: test
test:
	go test -cover -race ./...

.PHONY: generate
generate:
	go generate ./...

.PHONY: testcover
testcover:
	@echo go test -race -covermode=atomic ./...
	@echo "mode: atomic" > coverage.out
{'fraction_non_alphanumeric': 0.1495472994068061, 'fraction_numerical': 0.0031220730565095223, 'mean_word_length': 2.864897466827503, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3964803', 'n_tokens_mistral': 1336, 'n_tokens_neox': 1277, 'n_words': 366}