From 1ed5eae29ba49fe2576cb609afee2f68507c5d8e Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Wed, 6 May 2026 14:33:01 +0200 Subject: [PATCH] cfengine lint: Added check for uppercase body name, similar to bundle Signed-off-by: Ole Herman Schumacher Elgesem --- src/cfengine_cli/lint.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cfengine_cli/lint.py b/src/cfengine_cli/lint.py index 498eb3b..7f99b02 100644 --- a/src/cfengine_cli/lint.py +++ b/src/cfengine_cli/lint.py @@ -622,6 +622,14 @@ def _lint_block_name(node: Node, state: State, location: str, syntax_data: Synta raise ValidationError( f"Convention: Bundle name should be lowercase {location}", node ) + if ( + state.strict + and node.type == "body_block_name" + and _text(node) != _text(node).lower() + ): + raise ValidationError( + f"Convention: Body name should be lowercase {location}", node + ) if node.type == "promise_block_name" and _text(node) != _text(node).lower(): raise ValidationError( f"Convention: Promise type should be lowercase {location}", node