Skip to content

ci: add flake8 linting workflow#210

Open
steps-re wants to merge 1 commit into
arfc:masterfrom
steps-re:feat/add-flake8-ci
Open

ci: add flake8 linting workflow#210
steps-re wants to merge 1 commit into
arfc:masterfrom
steps-re:feat/add-flake8-ci

Conversation

@steps-re

@steps-re steps-re commented Jul 8, 2026

Copy link
Copy Markdown

Closes #206.

Adds .github/workflows/lint.yml — a lightweight GitHub Actions job that runs flake8 on saltproc/ and tests/ whenever either directory changes.

What it checks (--select=E9,F401,F811,F821,F841):

  • E9 — syntax errors that prevent the file from being parsed
  • F401 — imported but unused modules
  • F811 — redefinition of an unused name
  • F821 — undefined name (would fail at runtime)
  • F841 — assigned but never used local variable

What it deliberately skips: stylistic rules (line-length aside from a 120-char cap, whitespace, blank lines) — avoids flagging the existing codebase for conventions that predate this check and keeps the CI fast.

The job uses actions/setup-python rather than the conda stack since flake8 has no scientific dependencies, so it completes in seconds rather than the several minutes the full test matrix takes.

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 arfc#206

Signed-off-by: Mike German <mike@stepsventures.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add automatic flake8 linting to PRs

1 participant