Skip to content

Commit 5e7b94d

Browse files
committed
#11-add pylint action
1 parent c727805 commit 5e7b94d

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/ci.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI-Pipeline
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
env:
9+
PYTHON_VERSION: 3.11.5
10+
11+
jobs:
12+
pylint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up python ${{ env.PYTHON_VERSION }}
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ env.PYTHON_VERSION }}
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install pylint
27+
28+
- name: Analyse code with pylint
29+
run: |
30+
pylint $(git ls-files '*.py') --rcfile=.pylintrc

.pylintrc

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[tool.pylint.main]
2+
ignore-patterns = ["^\\.#"]
3+
4+
py-version = 3.11
5+
6+
[tool.pylint.basic]
7+
no-docstring-rgx = "^_"
8+
9+
[tool.pylint."messages control"]
10+
disable = raw-checker-failed, bad-inline-option, locally-disabled, file-ignored, suppressed-message, useless-suppression, deprecated-pragma, use-symbolic-message-instead, use-implicit-booleaness-not-comparison-to-string, use-implicit-booleaness-not-comparison-to-zero, missing-module-docstring, wrong-import-order, missing-function-docstring, missing-class-docstring, import-error, cyclic-import
11+
12+
[tool.pylint.variables]
13+
ignored-argument-names = "_.*|^ignored_|^unused_"
14+
15+
[FORMAT]
16+
max-line-length=120
17+
18+
[DESIGN]
19+
max-args=10
20+
min-public-methods=1
21+
max-locals=20

0 commit comments

Comments
 (0)