feat(config): warn on renamed 'process_quit' rule config key - #26
Merged
Conversation
…Code Generalize C120 to flag control-flow statements (ProcessQuit, ItemReject, ProcessBreak, ProcessError, ProcessRollback family, Break) used outside an IF/ELSE block, and extract the unreachable-code check into a new C140 rule. Guard is IF/ELSE only (WHILE does not count). S110 stays the deprecated alias for C120.
The 'process_quit' rule config key was renamed to 'conditional_control_flow'. Add it to _REMOVED_RULE_CONFIGS so loading a config that still uses the old key emits a LintiConfigWarning instead of silently ignoring it.
onefloid
commented
Jul 28, 2026
| ) | ||
| ), | ||
| "process_quit": ( | ||
| "The 'process_quit' rule was renamed. This setting is ignored; use " |
Member
Author
There was a problem hiding this comment.
It's not only renamed. It's replaced by two new rules, which support more function which interrupts the control flow.
| Returns: | ||
| True if inside an IF/ELSE block, False otherwise. | ||
| """ | ||
| return "if" in self.block_stack |
Member
Author
There was a problem hiding this comment.
The block stack is a list of if and while blocks. I think the block at the top of the stack should be an if block.
8 tasks
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.
No description provided.