<commit_before>all: cs dunit unit
travis: cs travis-unit
travis-benchmark: benchmark-travis benchmark-previous
contrib: cs dunit unit

init:
	if [ ! -d vendor ]; then composer install; fi;

cs: init
	./vendor/bin/phpcs --standard=PSR2 src/

unit: init
	./vendor/bin/phpunit --coverage-text --coverage-html covHtml

benchmark: init
	./vendor/bin/phpbench run benchmarks/ --report=aggregate --progress=dots --store

benchmark-previous: init
	./vendor/bin/phpbench show latest-1

benchmark-travis: init
	mkdir -p .phpbench_storage/xml
	mkdir -p .phpbench_storage/store
	./vendor/bin/phpbench run benchmarks/ --report=aggregate --progress=travis --dump-file=.phpbench_storage/xml/latest.xml --context=$(TRAVIS_BUILD_NUMBER)
	if [ -f ".phpbench_storage/xml/previous.xml" ]; then ./vendor/bin/phpbench report --file=.phpbench_storage/xml/previous.xml --file=.phpbench_storage/xml/latest.xml --report=compare; fi;
	mv .phpbench_storage/xml/latest.xml .phpbench_storage/xml/previous.xml

dunit: init
	./vendor/bin/dunit

travis-unit: init
	./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml

travis-coverage: init
	if [ -f ./build/logs/clover.xml ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi<commit_msg>Store results for later use<commit_after>all: cs dunit unit
travis: cs travis-unit
travis-benchmark: benchmark-travis
contrib: cs dunit unit

init:
	if [ ! -d vendor ]; then composer install; fi;

cs: init
	./vendor/bin/phpcs --standard=PSR2 src/

unit: init
	./vendor/bin/phpunit --coverage-text --coverage-html covHtml

benchmark: init
	./vendor/bin/phpbench run benchmarks/ --report=aggregate --progress=dots --store

benchmark-travis: init
	mkdir -p .phpbench_storage/xml
	mkdir -p .phpbench_storage/store
	./vendor/bin/phpbench run benchmarks/ --report=aggregate --progress=travis --store --dump-file=.phpbench_storage/xml/latest.xml --context=$(TRAVIS_BUILD_NUMBER)
	if [ -f ".phpbench_storage/xml/previous.xml" ]; then ./vendor/bin/phpbench report --file=.phpbench_storage/xml/previous.xml --file=.phpbench_storage/xml/latest.xml --report=compare; fi;
	mv .phpbench_storage/xml/latest.xml .phpbench_storage/xml/previous.xml

dunit: init
	./vendor/bin/dunit

travis-unit: init
	./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml

travis-coverage: init
	if [ -f ./build/logs/clover.xml ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi
{'fraction_non_alphanumeric': 0.14440993788819875, 'fraction_numerical': 0.0011645962732919255, 'mean_word_length': 3.946257197696737, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 32}, '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': '27576', 'n_tokens_mistral': 916, 'n_tokens_neox': 902, 'n_words': 192}