diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..5229a18 --- /dev/null +++ b/.flake8 @@ -0,0 +1,14 @@ +[flake8] +max-line-length = 127 +max-complexity = 10 +exclude = + .git, + __pycache__, + .pytest_cache, + *.pyc, + .venv, + venv, + env, + base/, + redis_data/, + .vagrant/ diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 0000000..a54c106 --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,27 @@ +name: Linting + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + flake8: + runs-on: ubuntu-24.04 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Install flake8 + run: pip install flake8 + + - name: Run flake8 + run: | + flake8 . --count --show-source --statistics