From 49543ef27ba64b3ebc0844d6f773631ddeddd54e Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Mon, 4 May 2026 17:47:09 +0200 Subject: [PATCH] cfengine lint: Removed argument count checks for body / bundle from non-strict mode We already have the undefined body / bundle only being checked in strict mode. However, since there can be multiple definitions, it could be the case that the definition we see is not the right / only one. Signed-off-by: Ole Herman Schumacher Elgesem --- src/cfengine_cli/lint.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cfengine_cli/lint.py b/src/cfengine_cli/lint.py index fb29a85..72e1e5a 100644 --- a/src/cfengine_cli/lint.py +++ b/src/cfengine_cli/lint.py @@ -838,7 +838,8 @@ def _lint_call(node: Node, state: State, location: str, syntax_data: SyntaxData) qualified_name = _qualify(call, state.namespace) if ( - not state.inside_call + state.strict + and not state.inside_call and qualified_name in state.bundles and state.attribute_name not in IMPLIES_BODY ): @@ -853,7 +854,8 @@ def _lint_call(node: Node, state: State, location: str, syntax_data: SyntaxData) [_definition_hint("bundle", call, definitions)], ) if ( - not state.inside_call + state.strict + and not state.inside_call and qualified_name in state.bodies and state.attribute_name not in IMPLIES_BUNDLE ):