Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 137 additions & 2 deletions src/cfengine_cli/syntax-description.json
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
},
"protocol_version": {
"attribute": "protocol_version",
"range": "1,classic,2,tls,3,cookie,4,filestream,latest",
"range": "1,classic,2,tls,3,cookie,4,filestream,5,leech2,latest",
"status": "normal",
"type": "option",
"visibility": "body"
Expand Down Expand Up @@ -1020,7 +1020,7 @@
},
"protocol_version": {
"attribute": "protocol_version",
"range": "1,classic,2,tls,3,cookie,4,filestream,latest",
"range": "1,classic,2,tls,3,cookie,4,filestream,5,leech2,latest",
"status": "normal",
"type": "option",
"visibility": "body"
Expand Down Expand Up @@ -3241,6 +3241,31 @@
}
},
"status": "normal"
},
"when": {
"attributes": {
"files_deleted": {
"attribute": "files_deleted",
"range": ".*",
"status": "normal",
"type": "slist",
"visibility": "body"
},
"inherit_from": {
"attribute": "inherit_from",
"status": "normal",
"type": "body",
"visibility": "body"
},
"meta": {
"attribute": "meta",
"range": "",
"status": "normal",
"type": "slist",
"visibility": "body"
}
},
"status": "normal"
}
},
"bundleTypes": {
Expand Down Expand Up @@ -3322,6 +3347,17 @@
"vars"
],
"status": "normal"
},
"watch": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"watch": {
"reactor": {

"promiseTypes": [
"events",
"classes",
"defaults",
"meta",
"reports",
"vars"
],
"status": "normal"
}
},
"functions": {
Expand Down Expand Up @@ -7368,6 +7404,13 @@
"type": "clist",
"visibility": "promiseType"
},
"cancel": {
"attribute": "cancel",
"range": "true,false,yes,no,on,off",
"status": "normal",
"type": "option",
"visibility": "promiseType"
},
"classes": {
"attribute": "classes",
"status": "normal",
Expand Down Expand Up @@ -7465,6 +7508,13 @@
"type": "clist",
"visibility": "promiseType"
},
"timer_policy": {
"attribute": "timer_policy",
"range": "absolute,reset",
"status": "normal",
"type": "option",
"visibility": "promiseType"
},
"unless": {
"attribute": "unless",
"range": "",
Expand Down Expand Up @@ -8157,6 +8207,91 @@
},
"status": "normal"
},
"events": {
"attributes": {
"action": {
"attribute": "action",
"status": "normal",
"type": "body",
"visibility": "global"
},
"classes": {
"attribute": "classes",
"status": "normal",
"type": "body",
"visibility": "global"
},
"comment": {
"attribute": "comment",
"range": "",
"status": "normal",
"type": "string",
"visibility": "global"
},
"depends_on": {
"attribute": "depends_on",
"range": "",
"status": "normal",
"type": "slist",
"visibility": "global"
},
"handle": {
"attribute": "handle",
"range": "",
"status": "normal",
"type": "string",
"visibility": "global"
},
"if": {
"attribute": "if",
"range": "",
"status": "normal",
"type": "string",
"visibility": "global"
},
"ifvarclass": {
"attribute": "ifvarclass",
"range": "",
"status": "normal",
"type": "string",
"visibility": "global"
},
"meta": {
"attribute": "meta",
"range": "",
"status": "normal",
"type": "slist",
"visibility": "global"
},
"then": {
"attribute": "then",
"status": "normal",
"type": "bundle",
"visibility": "promiseType"
},
"unless": {
"attribute": "unless",
"range": "",
"status": "normal",
"type": "string",
"visibility": "global"
},
"when": {
"attribute": "when",
"status": "normal",
"type": "body",
"visibility": "promiseType"
},
"with": {
"attribute": "with",
"range": "",
"status": "normal",
"type": "string",
"visibility": "global"
}
},
"status": "normal"
},
"field_edits": {
"attributes": {
"action": {
Expand Down
2 changes: 1 addition & 1 deletion tests/lint/004_block_type.expected.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

bundle notavalidtype my_bundle
^-----------^
Error: Bundle type must be one of (agent, common, edit_line, edit_xml, monitor, server), not 'notavalidtype' at tests/lint/004_block_type.x.cf:1:8
Error: Bundle type must be one of (agent, common, edit_line, edit_xml, monitor, server, watch), not 'notavalidtype' at tests/lint/004_block_type.x.cf:1:8

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Error: Bundle type must be one of (agent, common, edit_line, edit_xml, monitor, server, watch), not 'notavalidtype' at tests/lint/004_block_type.x.cf:1:8
Error: Bundle type must be one of (agent, common, edit_line, edit_xml, monitor, server, reactor), not 'notavalidtype' at tests/lint/004_block_type.x.cf:1:8



promise server my_promise_type
Expand Down
Loading