forked from dfirtrack/dfirtrack
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (27 loc) · 1.27 KB
/
lint_python.yml
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
name: Lint Python
on: [pull_request, push]
jobs:
lint_python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install bandit black codespell flake8 isort mypy pytest pyupgrade safety
- run: bandit --recursive --tests B106 --exclude tests . # hardcoded_password_funcarg
- run: bandit --recursive --tests B108 --exclude tests,dfirtrack_main/views/entry_views.py . # hardcoded_tmp_directory
- run: bandit --recursive --skip B106,B108 .
- run: black --check --skip-string-normalization .
- run: codespell --skip="*.css,*.js,*.map"
- run: flake8 . --count --select=E5,E9,F63,F7,F82,W291
--max-complexity=132 --max-line-length=313
--show-source --statistics
- run: flake8 . --count --exit-zero --ignore=E251
--max-line-length=313
--show-source --statistics
- run: isort --check-only --profile black .
- run: pip install -r requirements.txt
- run: mypy --install-types --non-interactive . || true
- run: pytest . || true
- run: pytest --doctest-modules . || true
- run: shopt -s globstar && pyupgrade --keep-mock --py36-plus **/*.py
- run: safety check