Skip to content

Commit 89953a6

Browse files
authored
Merge pull request #106 from olehermanse/main
cfengine lint: Moved deprecated promise check to strict mode
2 parents 7cbe7a7 + f8f0652 commit 89953a6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/cfengine_cli/lint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ def _lint_promise_guard(
583583
"""Check that a promise type guard (e.g. `vars:`) for deprecation or unknown type."""
584584
assert _text(node) and len(_text(node)) > 1 and _text(node)[-1] == ":"
585585
promise_type = _text(node)[0:-1]
586-
if promise_type in syntax_data.DEPRECATED_PROMISE_TYPES:
586+
if state.strict and promise_type in syntax_data.DEPRECATED_PROMISE_TYPES:
587587
raise ValidationError(
588588
f"Deprecation: Promise type '{promise_type}' is deprecated {location}",
589589
node,

0 commit comments

Comments
 (0)