<commit_before>all:
	@echo "make test(test_basic, test_diff, test_unit)"
	@echo "make pypireg"
	@echo "make coverage"
	@echo "make check"
	@echo "make clean"

PYTHON?=python

TEST_DIR=test
.PHONY: test test_basic test_diff test_unit
test: test_basic test_diff test_unit

test_basic:
	@echo '--->  Running basic test'
	${PYTHON} autopep8.py example.py > .tmp.test.py
	pep8 --repeat .tmp.test.py && echo 'OK'
	@rm .tmp.test.py

test_diff:
	@echo '--->  Running --diff test'
	@cp example.py .tmp.example.py
	${PYTHON} autopep8.py --diff .tmp.example.py > .tmp.example.py.patch
	patch < .tmp.example.py.patch
	@rm .tmp.example.py.patch
	pep8 --repeat .tmp.example.py && ${PYTHON} -m py_compile .tmp.example.py && echo 'OK'
	@rm .tmp.example.py

test_unit:
	@echo '--->  Running unit tests'
	${PYTHON} test/test_autopep8.py

coverage:
	@rm -rf htmlcov
	@AUTOPEP8_COVERAGE=1 coverage run --branch --parallel test/test_autopep8.py
	@coverage combine
	@coverage report
	@coverage html
	@coverage xml --include=autopep8.py
	@echo 'Coverage report: htmlcov/index.html'
	@rm .coverage

check:
	pep8 autopep8.py && echo 'OK'
	pylint --reports=no --include-ids=yes \
		--disable=C0111,C0103,F0401,R0902,W0511,R0914,R0912,R0915,R0904,R0911,R0913,W0142,W0212,C0302 \
		--rcfile=/dev/null autopep8.py && echo 'OK'

pypireg:
	${PYTHON} setup.py register
	${PYTHON} setup.py sdist upload

clean:
	rm -rf .tmp.test.py temp *.pyc *egg-info dist build \
		__pycache__ */__pycache__ */*/__pycache__ \
		htmlcov coverage.xml
<commit_msg>loosen pylint check for C0302<commit_after>all:
	@echo "make test(test_basic, test_diff, test_unit)"
	@echo "make pypireg"
	@echo "make coverage"
	@echo "make check"
	@echo "make clean"

PYTHON?=python

TEST_DIR=test
.PHONY: test test_basic test_diff test_unit
test: test_basic test_diff test_unit

test_basic:
	@echo '--->  Running basic test'
	${PYTHON} autopep8.py example.py > .tmp.test.py
	pep8 --repeat .tmp.test.py && echo 'OK'
	@rm .tmp.test.py

test_diff:
	@echo '--->  Running --diff test'
	@cp example.py .tmp.example.py
	${PYTHON} autopep8.py --diff .tmp.example.py > .tmp.example.py.patch
	patch < .tmp.example.py.patch
	@rm .tmp.example.py.patch
	pep8 --repeat .tmp.example.py && ${PYTHON} -m py_compile .tmp.example.py && echo 'OK'
	@rm .tmp.example.py

test_unit:
	@echo '--->  Running unit tests'
	${PYTHON} test/test_autopep8.py

coverage:
	@rm -rf htmlcov
	@AUTOPEP8_COVERAGE=1 coverage run --branch --parallel test/test_autopep8.py
	@coverage combine
	@coverage report
	@coverage html
	@coverage xml --include=autopep8.py
	@echo 'Coverage report: htmlcov/index.html'
	@rm .coverage

check:
	pep8 autopep8.py && echo 'OK'
	pylint --reports=no --include-ids=yes --max-module-lines=1500 \
		--disable=C0111,C0103,F0401,R0902,W0511,R0914,R0912,R0915,R0904,R0911,R0913,W0142,W0212,C0302 \
		--rcfile=/dev/null autopep8.py && echo 'OK'

pypireg:
	${PYTHON} setup.py register
	${PYTHON} setup.py sdist upload

clean:
	rm -rf .tmp.test.py temp *.pyc *egg-info dist build \
		__pycache__ */__pycache__ */*/__pycache__ \
		htmlcov coverage.xml

{'fraction_non_alphanumeric': 0.1502607561929596, 'fraction_numerical': 0.0469361147327249, 'mean_word_length': 3.8869426751592355, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '1280177', 'n_tokens_mistral': 1377, 'n_tokens_neox': 1298, 'n_words': 285}