Skip to content

Commit bed1713

Browse files
olehermanseclaude
andcommitted
cfengine format: Added newline before comment in more places
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
1 parent 4ce942c commit bed1713

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/cfengine_cli/format.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,13 @@ def autoformat(node, fmt, line_length, macro_indent, indent=0):
338338
fmt.print("", 0)
339339
elif child.type == "comment":
340340
prev = child.prev_named_sibling
341-
if prev and prev.type in ["promise", "half_promise"]:
341+
if prev and prev.type in [
342+
"promise",
343+
"half_promise",
344+
"class_guarded_promises",
345+
"class_guarded_body_attributes",
346+
"class_guarded_promise_block_attributes",
347+
]:
342348
parent = child.parent
343349
if parent and parent.type in [
344350
"bundle_section",

0 commit comments

Comments
 (0)