-
Notifications
You must be signed in to change notification settings - Fork 88
fix(ci): multiline match + empty-allowlist tolerance in flexframe lint (addresses #27554 reviews) #27556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
fix(ci): multiline match + empty-allowlist tolerance in flexframe lint (addresses #27554 reviews) #27556
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rg -U --multiline-dotall -nemits one output line for each line participating in a multiline match, not one line per match. In this script that means a single call like.frame(\n maxWidth: ...)is split into multiple normalized keys (for example...|.frame(and...|maxWidth: ...), soNEW_COUNTover-reports and the allowlist no longer follows its documented “one entry per occurrence” contract. This makes baseline management brittle and can let match-fragment churn slip through unintentionally; parse only the match start (e.g.--vimgrep/JSON) or collapse multiline hits beforenormalize.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declining as non-blocking. Reasoning: the lint's correctness invariant is 'any new violation fails CI', and the current implementation holds that — a multi-line match produces N allowlist entries that all must be present for the match to count as allowlisted. If any line of the match changes, the changed line is flagged as a new violation (correctly, not silently). The cost of the fragment-dedup fix (parsing
rg --jsonwith jq or building a consecutive-line heuristic that has to distinguish 'two adjacent single-line matches' from 'one multi-line match') outweighs the benefit (one logical violation = one allowlist entry). Current multi-line instances in the scanned dirs: 1 (ChatLoadingSkeleton). Will revisit if the codebase grows enough multi-line instances that allowlist verbosity becomes a real friction. Thanks for the review.