Skip to content

Commit

Permalink
Include formatting tests
Browse files Browse the repository at this point in the history
  • Loading branch information
albags committed Jul 19, 2024
1 parent 46d6a9b commit a83fd99
Show file tree
Hide file tree
Showing 5 changed files with 272 additions and 47 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length=120
40 changes: 40 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Pylint

on: [push, pull_request]

jobs:
build:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- 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
pip install pylint
pip install -r requirements.txt
- name: Create .pylintrc
run: |
echo "[MESSAGES CONTROL]" > .pylintrc
echo "disable=broad-exception-caught" >> .pylintrc
echo "" >> .pylintrc
echo "[FORMAT]" >> .pylintrc
echo "max-line-length=120" >> .pylintrc
echo "" >> .pylintrc
echo "[DESIGN]" >> .pylintrc
echo "max-locals=16" >> .pylintrc
echo "max-args=10" >> .pylintrc
- name: Run flake8
run: |
pip install flake8 flake8-bugbear flake8-black
flake8 --max-line-length=120 .
- name: Analyzing the code with pylint
run: |
pylint $(git ls-files '*.py')
9 changes: 9 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[MESSAGES CONTROL]
disable=broad-exception-caught

[FORMAT]
max-line-length=120

[DESIGN]
max-locals=16
max-args=10
Loading

0 comments on commit a83fd99

Please sign in to comment.