Skip to content

Commit dc62c6f

Browse files
authored
ci(add-linter-workflow): add pyLint as a linter for the repository (#4)
This commit adds a linter workflow for the repository.
1 parent 68a0173 commit dc62c6f

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/pylint.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Pylint
2+
3+
on:
4+
workflow_dispatch
5+
6+
jobs:
7+
build:
8+
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os: [ubuntu-latest]
14+
python: ["3.7", "3.8", "3.9"]
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Setup Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: ${{ matrix.python }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install pylint
25+
pip install pylint-fail-under
26+
- name: Analysing the code with pylint
27+
run: find . -name '*.py' -print -exec pylint --disable=R,C,W {} \;
28+
- name: Fails if pylint score is less than 10.0
29+
run: |
30+
for file in $(find -name '*.py')
31+
do
32+
pylint --disable=R,C,W "$file" --fail-under=10;
33+
done

0 commit comments

Comments
 (0)