File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,9 +152,9 @@ def stringify_single_line_nodes(nodes: list[Node]) -> str:
152152 result += " "
153153 if previous and previous .type == "=>" :
154154 result += " "
155- if previous and previous .type == "{" :
155+ if previous and previous .type == "{" and node . type != "}" :
156156 result += " "
157- if previous and node .type == "}" :
157+ if previous and node .type == "}" and previous . type != "{" :
158158 result += " "
159159 result += string
160160 previous = node
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ body common control
55 inputs => { "/var/cfengine/inputs/some_file.cf" };
66 linux::
77 inputs => { "/var/cfengine/inputs/other_file.cf" };
8+ ubuntu::
9+ inputs => {};
810}
911
1012promise agent example
@@ -30,6 +32,8 @@ bundle agent main
3032 # Comment at atttribute level
3133 string => "some_value";
3234
35+ "empty_list" slist => {};
36+
3337 classes:
3438 # Comment before promise
3539 "a" if => "b";
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ body common control{
55inputs => { "/var/cfengine/inputs/some_file.cf" };
66linux::
77inputs => { "/var/cfengine/inputs/other_file.cf" };
8+ ubuntu::
9+ inputs => {};
810}
911
1012promise agent example{
2628if => "bar"
2729# Comment at atttribute level
2830string => "some_value";
31+ "empty_list"
32+ slist => {
33+ };
2934classes:
3035# Comment before promise
3136"a" if => "b";
Original file line number Diff line number Diff line change 11bundle agent main
22{
33 packages:
4+ "platform-python-devel" -> {};
45 "platform-python-devel" -> { "cfbs shebang", "ENT-1234" };
56
67 "platform-python-devel" -> { "cfbs shebang", "ENT-1234" }
Original file line number Diff line number Diff line change 11bundle agent main
22{
33packages:
4+ "platform-python-devel" -> { };
45"platform-python-devel" -> { "cfbs shebang", "ENT-1234" };
56"platform-python-devel" -> { "cfbs shebang", "ENT-1234" }
67comment => "foo";
You can’t perform that action at this time.
0 commit comments