-
Notifications
You must be signed in to change notification settings - Fork 21
/
lint.mk
80 lines (62 loc) · 1.36 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
79
80
# Make commands for linting
SHELL := /bin/bash -euxo pipefail
.PHONY: yapf
yapf:
yapf --diff --recursive .
.PHONY: fix-yapf
fix-yapf:
yapf --in-place --recursive .
.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: linkcheck
linkcheck:
$(MAKE) -C docs/library linkcheck SPHINXOPTS=$(SPHINXOPTS)
$(MAKE) -C docs/cli linkcheck SPHINXOPTS=$(SPHINXOPTS)
.PHONY: spelling
spelling:
$(MAKE) -C docs/library spelling SPHINXOPTS=$(SPHINXOPTS)
$(MAKE) -C docs/cli spelling SPHINXOPTS=$(SPHINXOPTS)
.PHONY: custom-linters
custom-linters:
pytest -vvv -x admin/custom_linters.py
.PHONY: shellcheck
shellcheck:
shellcheck --exclude SC2164,SC1091 admin/*.sh
.PHONY: autoflake
autoflake:
autoflake \
--in-place \
--recursive \
--remove-all-unused-imports \
--remove-unused-variables \
--expand-star-imports \
--exclude _vendor,src/*/_version.py,versioneer.py,release \
.