forked from shahrk/feature-hunt
-
Notifications
You must be signed in to change notification settings - Fork 6
56 lines (46 loc) · 1.79 KB
/
pylint.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
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
name: Pylint
on: ["push", "pull_request"]
jobs:
build:
name: pylint
runs-on: ubuntu-latest
steps:
- 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 pylint
if [ -f ./backend/requirements.txt ]; then pip install -r ./backend/requirements.txt; fi
- name: Analyze files with pylint
run: |
echo "::group::Skipped files"
echo "Skipping files" | tee -a pylint.txt
echo "backend/app/controllers/__init__.py" | tee -a pylint.txt
echo "backend/logger/__init__.py" | tee -a pylint.txt
echo "backend/linter.py" | tee -a pylint.txt
echo "See each individual file for pylint comments." | tee -a pylint.txt
echo "Be sure to update this workflow if any files are skipped/unskipped." | tee -a pylint.txt
echo "::endgroup::"
pylint --fail-under=10 `find -regextype egrep -regex '(.*.py)$'` |
tee -a pylint.txt
- name: Upload pylint report as artifact
uses: actions/upload-artifact@v2
with:
name: pylint report
path: pylint.txt
- name: pylint workflow status
run: |
echo "::group::Skipped files"
echo "backend/app/controllers/__init__.py"
echo "backend/logger/__init__.py"
echo "backend/linter.py"
echo "::endgroup::"
echo "See each individual file for pylint comments."
echo "Be sure to update this workflow if any files are skipped/unskipped."
pylint --fail-under=5 $(find . -name "*.py" | xargs)
# run: pylint $(find . -name "*.py" | xargs)
# note: set the failure threshold as indicated above