Skip to content

Commit 49543ef

Browse files
committed
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 <ole@northern.tech>
1 parent 03ecbb2 commit 49543ef

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/cfengine_cli/lint.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,8 @@ def _lint_call(node: Node, state: State, location: str, syntax_data: SyntaxData)
838838

839839
qualified_name = _qualify(call, state.namespace)
840840
if (
841-
not state.inside_call
841+
state.strict
842+
and not state.inside_call
842843
and qualified_name in state.bundles
843844
and state.attribute_name not in IMPLIES_BODY
844845
):
@@ -853,7 +854,8 @@ def _lint_call(node: Node, state: State, location: str, syntax_data: SyntaxData)
853854
[_definition_hint("bundle", call, definitions)],
854855
)
855856
if (
856-
not state.inside_call
857+
state.strict
858+
and not state.inside_call
857859
and qualified_name in state.bodies
858860
and state.attribute_name not in IMPLIES_BUNDLE
859861
):

0 commit comments

Comments
 (0)