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
+13-2
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,9 @@ ziglint --check-format
74
74
```
75
75
76
76
## `exclude`
77
-
This rule excludes files from being linted (unless they are specified on the command line directly). Currently, it's only available in `ziglint.json`.
77
+
This rule excludes files from being linted (unless they are specified on the command line directly).
78
+
79
+
Note that include/exclude directives are additive and there is no priority for specifying on the command line. (However, include directives take precedence over excludes.)
78
80
79
81
It accepts Gitignore-style globs to specify paths.
80
82
### `ziglint.json`
@@ -83,9 +85,14 @@ It accepts Gitignore-style globs to specify paths.
83
85
"exclude": <array of files to exclude>
84
86
}
85
87
```
88
+
### Command line
89
+
```bash
90
+
ziglint --exclude <comma-separated list of paths to exclude>
91
+
```
86
92
87
93
## `include`
88
-
This rule negates exclusions. If the `include`d files aren't in the paths/working directory `ziglint` is searching in, they still won't be linted, but if they were listed in an `exclude` rule then they will be. Currently, this rule is only available in `ziglint.json`.
94
+
This rule negates exclusions. If the `include`d files aren't in the paths/working directory `ziglint` is searching in, they still won't be linted, but if they were listed in an `exclude` rule then they will be.
95
+
Note that include/exclude directives are additive and there is no priority for specifying on the command line. (However, include directives take precedence over excludes.)
89
96
90
97
Like `exclude`, it accepts Gitignore-style globs to match paths.
91
98
### `ziglint.json`
@@ -94,6 +101,10 @@ Like `exclude`, it accepts Gitignore-style globs to match paths.
94
101
"include": <array of files to include>
95
102
}
96
103
```
104
+
### Command line
105
+
```bash
106
+
ziglint --include <comma-separated list of paths to include>
107
+
```
97
108
98
109
## `max_line_length`
99
110
This rule restricts the possible length of a line of source code. It will create a linting error if any line of Zig code is longer than the specified maximum. It defaults to 100 characters.
0 commit comments