diff --git a/tools/chplcheck/src/rules.py b/tools/chplcheck/src/rules.py index f8b11fc00d2b..fa81119bd931 100644 --- a/tools/chplcheck/src/rules.py +++ b/tools/chplcheck/src/rules.py @@ -885,7 +885,7 @@ def unwrap_intermediate_block(node: AstNode) -> Optional[AstNode]: # only loops and NamedDecls can be anchors for indentation anchor = ( parent_for_indentation - if not isinstance(parent_for_indentation, (Loop, NamedDecl)) + if isinstance(parent_for_indentation, (Loop, NamedDecl)) else None ) yield AdvancedRuleResult(child, anchor=anchor)