<commit_before>NO_COLOR=\x1b[0m
OK_COLOR=\x1b[32;01m
ERROR_COLOR=\x1b[31;01m
WARN_COLOR=\x1b[33;01m

PHP=php
PHP_NO_INI=php -n
PHPUNIT=vendor/bin/phpunit

all: autoload tests testdox cov

autoload:
	composer dumpautoload

test:
	$(PHP) $(PHPUNIT) -c phpunit.xml.dist tests

testdox:
	@$(PHP_NO_INI) $(PHPUNIT) -c phpunit.xml.dist --testdox tests \
	 | sed 's/\[x\]/$(OK_COLOR)$\[x]$(NO_COLOR)/' \
	 | sed -r 's/(\[ \].+)/$(ERROR_COLOR)\1$(NO_COLOR)/' \
	 | sed -r 's/(^[^ ].+)/$(WARN_COLOR)\1$(NO_COLOR)/'

testdox-osx:
	@$(PHP_NO_INI) $(PHPUNIT) -c phpunit.xml.dist --testdox tests \
	 | sed 's/\[x\]/$(OK_COLOR)$\[x]$(NO_COLOR)/' \
	 | sed -E 's/(\[ \].+)/$(ERROR_COLOR)\1$(NO_COLOR)/' \
	 | sed -E 's/(^[^ ].+)/$(WARN_COLOR)\1$(NO_COLOR)/'

cov:
	@$(PHP) $(PHPUNIT) -c phpunit.xml.dist --coverage-text

style:
	@$(PHP_NO_INI) vendor/bin/php-cs-fixer fix --verbose src
	@$(PHP_NO_INI) vendor/bin/php-cs-fixer fix --verbose tests

phar:
	@composer update --no-dev
	@$(PHP_NO_INI) box.phar build
	@composer update

c: cov

t: test

d: testdox<commit_msg>Add shortcut for make style<commit_after>NO_COLOR=\x1b[0m
OK_COLOR=\x1b[32;01m
ERROR_COLOR=\x1b[31;01m
WARN_COLOR=\x1b[33;01m

PHP=php
PHP_NO_INI=php -n
PHPUNIT=vendor/bin/phpunit

all: autoload tests testdox cov

autoload:
	composer dumpautoload

test:
	$(PHP) $(PHPUNIT) -c phpunit.xml.dist tests

testdox:
	@$(PHP_NO_INI) $(PHPUNIT) -c phpunit.xml.dist --testdox tests \
	 | sed 's/\[x\]/$(OK_COLOR)$\[x]$(NO_COLOR)/' \
	 | sed -r 's/(\[ \].+)/$(ERROR_COLOR)\1$(NO_COLOR)/' \
	 | sed -r 's/(^[^ ].+)/$(WARN_COLOR)\1$(NO_COLOR)/'

testdox-osx:
	@$(PHP_NO_INI) $(PHPUNIT) -c phpunit.xml.dist --testdox tests \
	 | sed 's/\[x\]/$(OK_COLOR)$\[x]$(NO_COLOR)/' \
	 | sed -E 's/(\[ \].+)/$(ERROR_COLOR)\1$(NO_COLOR)/' \
	 | sed -E 's/(^[^ ].+)/$(WARN_COLOR)\1$(NO_COLOR)/'

cov:
	@$(PHP) $(PHPUNIT) -c phpunit.xml.dist --coverage-text

style:
	@$(PHP_NO_INI) vendor/bin/php-cs-fixer fix --verbose src
	@$(PHP_NO_INI) vendor/bin/php-cs-fixer fix --verbose tests

phar:
	@composer update --no-dev
	@$(PHP_NO_INI) box.phar build
	@composer update

c: cov

t: test

d: testdox

s: style
{'fraction_non_alphanumeric': 0.23123827392120075, 'fraction_numerical': 0.019699812382739212, 'mean_word_length': 3.7190265486725664, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '2285539', 'n_tokens_mistral': 1037, 'n_tokens_neox': 995, 'n_words': 181}