Skip to content

Commit 0a78595

Browse files
rockett-mHalosGhost
authored andcommitted
linting workflow added to check python code
Signed-off-by: Morgan Rockett <[email protected]>
1 parent 41ea652 commit 0a78595

File tree

2 files changed

+687
-0
lines changed

2 files changed

+687
-0
lines changed

.github/workflows/pylint.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Pylint
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- trunk
7+
push:
8+
branches:
9+
- trunk
10+
11+
defaults:
12+
run:
13+
shell: bash
14+
15+
env:
16+
BUILD_DIR: x86_64
17+
18+
jobs:
19+
pylint:
20+
name: Pylint
21+
runs-on: ubuntu-22.04
22+
continue-on-error: true
23+
strategy:
24+
matrix:
25+
python-version: ["3.10"]
26+
steps:
27+
- uses: actions/checkout@v4
28+
with:
29+
submodules: recursive
30+
- name: Set up Python ${{ matrix.python-version }}
31+
uses: actions/setup-python@v4
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
- name: Install dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
if [ -f requirements_py.txt ]; then pip install -r requirements_py.txt; fi
38+
pip install pylint
39+
- name: Lint with Pylint
40+
run: |
41+
# In the future we should have (minimum score of 8.0/10.0 or 9.0/10.0)
42+
pylint --rcfile=.pylintrc $(git ls-files '*.py') --fail-under=5.0

0 commit comments

Comments
 (0)