Skip to content

chore(ci): Lint all files when lint configuration changes - #131867

Merged
leeandher merged 2 commits into
masterfrom
leander/prek-all-on-lint-changes
Nov 20, 2026
Merged

leeandher merged 2 commits into
masterfrom
leander/prek-all-on-lint-changes

Conversation

@leeandher

Copy link
Copy Markdown
Member

lint config changes should now run prek --all-files instead of prek --files which may miss some violations that would cause failures on future, unrelated PRs.

this happened when I added a new s035 flake8 rule in #130924, which passed CI on branch + master, but caused a violation in a PR with >1000 files updated, thus requiring a separate PR (#131763) to be merged and unblock it

the responsibility of addressing violations should fall on the PRs that add the rule, and only require other contributors to address the violations they introduce

@leeandher
leeandher requested a review from a team November 19, 2026 19:00
@leeandher
leeandher requested a review from a team as a code owner November 19, 2026 19:01
# stops bash from starting. Leave it empty and lint every file instead.
ALL_FILES: ${{ fromJSON(steps.changes.outputs.all_count) <= 1000 && steps.changes.outputs.all_files || '' }}
# stops bash from starting. Lint every file instead.
TOO_MANY_FILES: ${{ fromJSON(steps.changes.outputs.changed_count) > 1000 }}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copied the pattern from

# Linux caps a single environment variable at 128 KiB, so a huge file list
# stops bash from starting. Run the full suite instead.
FRONTEND_TOO_MANY_FILES: ${{ fromJSON(needs.files-changed.outputs.frontend_all_count) > 1000 }}
FRONTEND_ALL_FILES: ${{ fromJSON(needs.files-changed.outputs.frontend_all_count) <= 1000 && needs.files-changed.outputs.frontend_all_files || '' }}
btw

@leeandher
leeandher force-pushed the leander/prek-all-on-lint-changes branch from 842a0c9 to 4261fec Compare November 19, 2026 21:32
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 19, 2026
@leeandher
leeandher merged commit 901bf5b into master Nov 20, 2026
69 checks passed
@leeandher
leeandher deleted the leander/prek-all-on-lint-changes branch November 20, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants