You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,23 @@ cfengine format
47
47
cfengine lint
48
48
```
49
49
50
+
You can also specify filenames or folders;
51
+
52
+
```bash
53
+
cfengine lint main.cf
54
+
```
55
+
56
+
When it finds a mistake, it points out where the problem is like this;
57
+
58
+
```
59
+
"Hello, CFEngine"
60
+
ifvarclass => "cfengine";
61
+
^--------^
62
+
Deprecation: Use 'if' instead of 'ifvarclass' at main.cf:5:7
63
+
FAIL: main.cf (1 errors)
64
+
Failure, 1 errors in total.
65
+
```
66
+
50
67
Note that since we use a different parser than `cf-agent` / `cf-promises`, they are not 100% in sync.
51
68
`cf-agent` could point out something as a syntax error, while `cfengine lint` does not and vice versa.
52
69
We aim to make the tree-sitter parser (used in this tool) more strict in general, so that when `cfengine lint` is happy with your policy, `cf-agent` will also accept it.
0 commit comments