ci: add flake8 linting workflow#210
Open
steps-re wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #206.
Adds
.github/workflows/lint.yml— a lightweight GitHub Actions job that runsflake8onsaltproc/andtests/whenever either directory changes.What it checks (
--select=E9,F401,F811,F821,F841):E9— syntax errors that prevent the file from being parsedF401— imported but unused modulesF811— redefinition of an unused nameF821— undefined name (would fail at runtime)F841— assigned but never used local variableWhat 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-pythonrather than the conda stack sinceflake8has no scientific dependencies, so it completes in seconds rather than the several minutes the full test matrix takes.