-
Notifications
You must be signed in to change notification settings - Fork 20
51 lines (49 loc) · 1.4 KB
/
python_linter.yaml
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
name : Python linter Flake8 and Pylint
on:
push:
path: "**.py"
pull_request:
path: "**.py"
jobs:
Pylint:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
pip install pylint
- name: set pythonpath
run: |
echo "PYTHONPATH=." >> $GITHUB_ENV
- name: Pylint
run: >
find . -type f -name "*.py" |
xargs pylint
--max-line-length=120
--disable=C0103,C0114,C0115,C0116,C0201,C0206,C0325,C0411
--disable=E0611
--disable=R0402,R0801,R0903,R0912,R0914,R0915,R1702,R1705,R1720,R1721,R1724
--disable=W0212,W0511,W0611,W0612,W0622,W1309,W1203,W1512,W1514
Flake8:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: flake8 lint
uses: py-actions/flake8@v2
with:
path: "."
max-line-length: 120
update-pip: TRUE
ignore: E121,F401,F403,F541,W503