-
Notifications
You must be signed in to change notification settings - Fork 0
/
lint.mk
78 lines (63 loc) · 1.22 KB
/
lint.mk
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Make commands for linting
SHELL := /bin/bash -euxo pipefail
.PHONY: yapf
yapf:
yapf \
--diff \
--recursive \
--exclude 'src/*/_vendor' \
--exclude 'src/*/_version.py' \
--exclude release/ \
--exclude versioneer.py \
.
.PHONY: fix-yapf
fix-yapf:
yapf \
--in-place \
--recursive \
--exclude 'src/*/_version.py' \
--exclude versioneer.py \
.
.PHONY: mypy
mypy:
mypy *.py src/ tests/ admin/
.PHONY: check-manifest
check-manifest:
check-manifest .
.PHONY: doc8
doc8:
doc8 .
.PHONY: flake8
flake8:
flake8 .
.PHONY: isort
isort:
isort --recursive --check-only
.PHONY: pip-extra-reqs
pip-extra-reqs:
pip-extra-reqs src/
.PHONY: pip-missing-reqs
pip-missing-reqs:
pip-missing-reqs src/
.PHONY: pylint
pylint:
pylint *.py src/ tests/ admin/
.PHONY: pyroma
pyroma:
pyroma --min 10 .
.PHONY: vulture
vulture:
vulture --min-confidence 100 --exclude _vendor .
.PHONY: custom-linters
custom-linters:
pytest -vvv -x admin/custom_linters.py
.PHONY: autoflake
autoflake:
autoflake \
--in-place \
--recursive \
--remove-all-unused-imports \
--remove-unused-variables \
--expand-star-imports \
--exclude src/*/_version.py,versioneer.py,release \
.