Skip to content

feat(config): warn on renamed 'process_quit' rule config key - #26

Merged
onefloid merged 2 commits into
mainfrom
rule/conditional-control-flow
Aug 2, 2026
Merged

feat(config): warn on renamed 'process_quit' rule config key#26
onefloid merged 2 commits into
mainfrom
rule/conditional-control-flow

Conversation

@onefloid

Copy link
Copy Markdown
Member

No description provided.

onefloid added 2 commits July 26, 2026 14:19
…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.
Comment thread src/linti/config.py
)
),
"process_quit": (
"The 'process_quit' rule was renamed. This setting is ignored; use "

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.

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

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.

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.

@onefloid
onefloid merged commit dd45f54 into main Aug 2, 2026
2 checks passed
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.

1 participant