<commit_before>LCMARK_ROCKSPEC=$(lastword $(sort $(wildcard rockspecs/lcmark-*.rockspec)))
TESTS=tests
CMARK_DIR=../cmark

.PHONY: clean, test, all, rock, update, check

all: rock lcmark.1

lcmark.1: lcmark.1.md templates/default.man
	bin/lcmark -t man --template templates/default.man -o $@ $<

rock:
	luarocks --local make $(LCMARK_ROCKSPEC)

update: $(TESTS)/spec-tests.lua

$(TESTS)/spec-tests.lua: $(CMARK_DIR)/test/spec.txt
	python3 $(CMARK_DIR)/test/spec_tests.py -d --spec $< | sed -e 's/^\([ \t]*\)"\([^"]*\)":/\1\2 = /' | sed -e 's/^\[/return {/' | sed -e 's/^\]/}/' > $@

check:
	luacheck bin/lcmark lcmark.lua

test:
	busted test.lua

clean:
	rm -rf *.o $(CBITS)/*.o<commit_msg>Have 'make check' run luacheck.<commit_after>LCMARK_ROCKSPEC=$(lastword $(sort $(wildcard rockspecs/lcmark-*.rockspec)))
TESTS=tests
CMARK_DIR=../cmark

.PHONY: clean, test, all, rock, update, check

all: rock lcmark.1

lcmark.1: lcmark.1.md templates/default.man
	bin/lcmark -t man --template templates/default.man -o $@ $<

rock:
	luarocks --local make $(LCMARK_ROCKSPEC)

update: $(TESTS)/spec-tests.lua

$(TESTS)/spec-tests.lua: $(CMARK_DIR)/test/spec.txt
	python3 $(CMARK_DIR)/test/spec_tests.py -d --spec $< | sed -e 's/^\([ \t]*\)"\([^"]*\)":/\1\2 = /' | sed -e 's/^\[/return {/' | sed -e 's/^\]/}/' > $@

check:
	luacheck bin/lcmark lcmark.lua

test: check
	busted test.lua

clean:
	rm -rf *.o $(CBITS)/*.o
{'fraction_non_alphanumeric': 0.22435897435897437, 'fraction_numerical': 0.008547008547008548, 'mean_word_length': 3.576547231270358, 'pattern_counts': {'":': 2, '<': 7, '<?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': '6548637', 'n_tokens_mistral': 612, 'n_tokens_neox': 607, 'n_words': 124}