From a461a1e25c254ef7a760cb5d8b6a1ec9624440db Mon Sep 17 00:00:00 2001 From: Mike German Date: Wed, 8 Jul 2026 12:14:44 -0400 Subject: [PATCH] ci: add flake8 linting workflow for saltproc and tests Adds a GitHub Actions lint job that runs flake8 on saltproc/ and tests/ whenever those directories change. Selects E9 (syntax/runtime errors) and the F-codes most likely to mask real bugs (unused imports, redefined names, undefined names, unused assignments), with a 120-char line limit to avoid flagging existing style-only lines. Closes #206 Signed-off-by: Mike German --- .github/workflows/lint.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..db718acaa --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,34 @@ +name: Lint + +on: + push: + paths: + - 'saltproc/**' + - 'tests/**' + pull_request: + paths: + - 'saltproc/**' + - 'tests/**' + +jobs: + flake8: + name: flake8 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Install flake8 + run: pip install flake8 + + - name: Run flake8 + run: | + flake8 saltproc/ tests/ \ + --select=E9,F401,F811,F821,F841 \ + --max-line-length=120 \ + --show-source \ + --statistics