Skip to content

Commit 1ed5eae

Browse files
committed
cfengine lint: Added check for uppercase body name, similar to bundle
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
1 parent 7cbe7a7 commit 1ed5eae

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/cfengine_cli/lint.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,14 @@ def _lint_block_name(node: Node, state: State, location: str, syntax_data: Synta
622622
raise ValidationError(
623623
f"Convention: Bundle name should be lowercase {location}", node
624624
)
625+
if (
626+
state.strict
627+
and node.type == "body_block_name"
628+
and _text(node) != _text(node).lower()
629+
):
630+
raise ValidationError(
631+
f"Convention: Body name should be lowercase {location}", node
632+
)
625633
if node.type == "promise_block_name" and _text(node) != _text(node).lower():
626634
raise ValidationError(
627635
f"Convention: Promise type should be lowercase {location}", node

0 commit comments

Comments
 (0)