-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnoxfile-lint.py
41 lines (37 loc) · 1.05 KB
/
noxfile-lint.py
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
from vox import FlagsBuilder, Manager, get_options, linty, mutations
from vox.linters import python
options = get_options()
if options.posargs:
files = options.posargs
else:
files = "src"
manager = Manager(files=files)
manager.lint(python.RadonCC)
manager.lint(python.RadonMI)
# manager.lint(python.Pyroma, FlagsBuilder().build(files='.'))
manager.lint(python.DetectSecrets)
manager.lint(python.Pydiatra)
manager.lint(python.Pylama)
manager.lint(python.Prospector)
manager.lint(python.Bandit)
# manager.lint(python.Frosted)
manager.lint(python.Vulture)
manager.lint(python.Pydocstyle)
manager.lint(python.Pylint)
manager.lint(python.Mypy)
manager.lint(python.PyCodeStyle)
manager.lint(python.Pyflakes)
# manager.lint(python.Jedi) # slow + buggy
manager.lint(python.Flake8)
@manager.display(
[
mutations.sort_location,
mutations.clean_extensions,
mutations.merge_duplicates,
mutations.remove_mam,
mutations.remove_nosa,
]
)
def display(messages):
linty.display.default(messages)
messages.clear() # TODO: remove