forked from m-burst/pylint-requests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (27 loc) · 814 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.PHONY: init test test-cov lint format
CODE = pylint_requests
TEST = pytest --verbosity=2 --showlocals --strict --cov=$(CODE)
init:
poetry install
echo '#!/bin/sh\nmake lint test\n' > .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
test:
$(TEST) -k "$(k)"
test-cov:
$(TEST) --cov-report=html
lint:
flake8 --jobs 4 --statistics --show-source $(CODE) tests
pylint --jobs 4 --rcfile=setup.cfg $(CODE)
mypy $(CODE) tests
black --target-version py36 --skip-string-normalization --check $(CODE) tests
pytest --dead-fixtures --dup-fixtures
format:
isort --apply --recursive $(CODE) tests
black --target-version py36 --skip-string-normalization $(CODE) tests
unify --in-place --recursive $(CODE) tests
bump_major:
bumpversion major
bump_minor:
bumpversion minor
bump_patch:
bumpversion patch