<commit_before>SHELL := /bin/bash

.PHONY: test
test: .fmtpolice
	go test ./...

fmtpolice:
	curl -sL https://raw.githubusercontent.com/rafecolton/fmtpolice/master/fmtpolice -o $@

.PHONY:
.fmtpolice: fmtpolice
	bash fmtpolice
	@find . -type f -name '*.test' -exec rm {} \;

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

coverage:
	curl -sL https://raw.githubusercontent.com/rafecolton/fmtpolice/master/coverage -o $@

.PHONY: .coverage
.coverage: coverage
	go get -u code.google.com/p/go.tools/cmd/cover || go get -u golang.org/x/tools/cmd/cover
	go get -u github.com/axw/gocov/gocov
	bash coverage

.PHONY: goveralls
goveralls: .coverage
	go get -u github.com/mattn/goveralls
	@echo "goveralls -coverprofile=gover.coverprofile -repotoken <redacted>"
	@goveralls -coverprofile=gover.coverprofile -repotoken $(GOVERALLS_TOKEN)<commit_msg>Rearranging makefile so we can `make coverage` separately<commit_after>SHELL := /bin/bash

.PHONY: test
test: .fmtpolice
	go test ./...

fmtpolice:
	curl -sL https://raw.githubusercontent.com/rafecolton/fmtpolice/master/fmtpolice -o $@

.PHONY:
.fmtpolice: fmtpolice
	bash fmtpolice
	@find . -type f -name '*.test' -exec rm {} \;

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

.PHONY: coverage
coverage: $(PWD)/coverage
	go get -u code.google.com/p/go.tools/cmd/cover || go get -u golang.org/x/tools/cmd/cover
	go get -u github.com/axw/gocov/gocov
	bash coverage

$(PWD)/coverage:
	curl -sL https://raw.githubusercontent.com/rafecolton/fmtpolice/master/coverage -o $@

.PHONY: goveralls
goveralls: coverage
	go get -u github.com/mattn/goveralls
	@echo "goveralls -coverprofile=gover.coverprofile -repotoken <redacted>"
	@goveralls -coverprofile=gover.coverprofile -repotoken $(GOVERALLS_TOKEN)
{'fraction_non_alphanumeric': 0.14635568513119535, 'fraction_numerical': 0.0, 'mean_word_length': 3.727272727272727, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '1703107', 'n_tokens_mistral': 716, 'n_tokens_neox': 678, 'n_words': 150}