Skip to content

Commit

Permalink
linting workflow added to check python code
Browse files Browse the repository at this point in the history
Signed-off-by: Morgan Rockett <[email protected]>
  • Loading branch information
rockett-m authored and HalosGhost committed Jun 12, 2024
1 parent 41ea652 commit 0a78595
Show file tree
Hide file tree
Showing 2 changed files with 687 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Pylint

on:
pull_request:
branches:
- trunk
push:
branches:
- trunk

defaults:
run:
shell: bash

env:
BUILD_DIR: x86_64

jobs:
pylint:
name: Pylint
runs-on: ubuntu-22.04
continue-on-error: true
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements_py.txt ]; then pip install -r requirements_py.txt; fi
pip install pylint
- name: Lint with Pylint
run: |
# In the future we should have (minimum score of 8.0/10.0 or 9.0/10.0)
pylint --rcfile=.pylintrc $(git ls-files '*.py') --fail-under=5.0
Loading

0 comments on commit 0a78595

Please sign in to comment.