dts-linter 0.3.0-beta1 → 0.3.0-beta10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -17
- package/dist/THIRD_PARTY_LICENSES.txt +235 -0
- package/dist/dts-linter.js +53 -151
- package/package.json +12 -11
package/README.md
CHANGED
|
@@ -35,22 +35,23 @@ dts-linter --formatFixAll
|
|
|
35
35
|
|
|
36
36
|
### Command Line Options
|
|
37
37
|
|
|
38
|
-
| Option | Type | Default | Description
|
|
39
|
-
| ----------------------- | --------------- | --------------- |
|
|
40
|
-
| `--file` | string | Auto-discover | List of input files (can be repeated)
|
|
41
|
-
| `--cwd` | string | `process.cwd()` | Set the current working directory
|
|
42
|
-
| `--include` | string | `[]` | Paths to resolve includes (absolute or relative to CWD, can be repeated)
|
|
43
|
-
| `--binding` | string | `[]` | Zephyr binding root directories (absolute or relative to CWD, can be repeated)
|
|
44
|
-
| `--logLevel` | `none\|verbose` | `none` | Set the logging verbosity
|
|
45
|
-
| `--format` | boolean | `false` | Format the specified files (automatically set to true when formatFixAll)
|
|
46
|
-
| `--formatFixAll` | boolean | `false` | Apply formatting changes directly to files
|
|
47
|
-
| `--processIncludes` | boolean | `false` | Process includes for formatting or diagnostics (automatically set to true when diagnosticsFull)
|
|
48
|
-
| `--diagnostics` | boolean | `false` | Show basic syntax diagnostics
|
|
49
|
-
| `--diagnosticsFull` | boolean | `false` | Show full diagnostics including semantic analysis (requires --include, --binding for proper usage)
|
|
50
|
-
| `--showInfoDiagnostics` | boolean | `false` | Show information-level diagnostics
|
|
51
|
-
| `--patchFile` | string | - | Write formatting diff output to file
|
|
52
|
-
| `--outputType` | string | `auto` | Output format type: auto, pretty, annotations, or json
|
|
53
|
-
| `--
|
|
38
|
+
| Option | Type | Default | Description |
|
|
39
|
+
| ----------------------- | --------------- | --------------- | -------------------------------------------------------------------------------------------------- |
|
|
40
|
+
| `--file` | string | Auto-discover | List of input files (can be repeated) |
|
|
41
|
+
| `--cwd` | string | `process.cwd()` | Set the current working directory |
|
|
42
|
+
| `--include` | string | `[]` | Paths to resolve includes (absolute or relative to CWD, can be repeated) |
|
|
43
|
+
| `--binding` | string | `[]` | Zephyr binding root directories (absolute or relative to CWD, can be repeated) |
|
|
44
|
+
| `--logLevel` | `none\|verbose` | `none` | Set the logging verbosity |
|
|
45
|
+
| `--format` | boolean | `false` | Format the specified files (automatically set to true when formatFixAll) |
|
|
46
|
+
| `--formatFixAll` | boolean | `false` | Apply formatting changes directly to files |
|
|
47
|
+
| `--processIncludes` | boolean | `false` | Process includes for formatting or diagnostics (automatically set to true when diagnosticsFull) |
|
|
48
|
+
| `--diagnostics` | boolean | `false` | Show basic syntax diagnostics |
|
|
49
|
+
| `--diagnosticsFull` | boolean | `false` | Show full diagnostics including semantic analysis (requires --include, --binding for proper usage) |
|
|
50
|
+
| `--showInfoDiagnostics` | boolean | `false` | Show information-level diagnostics |
|
|
51
|
+
| `--patchFile` | string | - | Write formatting diff output to file |
|
|
52
|
+
| `--outputType` | string | `auto` | Output format type: auto, pretty, annotations, or json |
|
|
53
|
+
| `--threads` | number | `1` | Number of parallel LSP instances to use for processing files |
|
|
54
|
+
| `--help` | boolean | `false` | Show help information |
|
|
54
55
|
|
|
55
56
|
### Examples
|
|
56
57
|
|
|
@@ -78,10 +79,26 @@ dts-linter --diagnosticsFull --include ./include --binding ./zephyr/dts/bindings
|
|
|
78
79
|
dts-linter --format --patchFile changes.patch
|
|
79
80
|
```
|
|
80
81
|
|
|
82
|
+
#### Use multiple threads for faster processing
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
dts-linter --format --diagnostics --threads 4
|
|
86
|
+
```
|
|
87
|
+
|
|
81
88
|
## File Discovery
|
|
82
89
|
|
|
83
90
|
When no `--file` option is provided, the linter automatically searches for DeviceTree files using the pattern `**/*.{dts,dtsi,overlay}` or `**/*.{dts}` when using `--diagnosticsFull` in the current working directory.
|
|
84
91
|
|
|
92
|
+
## Performance and Threading
|
|
93
|
+
|
|
94
|
+
The linter supports parallel processing using multiple LSP instances to improve performance when processing many files:
|
|
95
|
+
|
|
96
|
+
- Use `--threads N` to specify the number of parallel LSP instances
|
|
97
|
+
- Each thread runs its own LSP server instance
|
|
98
|
+
- Files are automatically distributed among available threads
|
|
99
|
+
- Recommended to use 2-4 threads for optimal performance depending on your system
|
|
100
|
+
- Threading is particularly beneficial when processing large numbers of files or when using `--diagnosticsFull`
|
|
101
|
+
|
|
85
102
|
## Output Formats
|
|
86
103
|
|
|
87
104
|
### Standard Output
|
|
@@ -101,7 +118,7 @@ When running in CI environments (GitHub Actions, GitLab CI, etc.), the tool auto
|
|
|
101
118
|
|
|
102
119
|
### JSON
|
|
103
120
|
|
|
104
|
-
Returns a JSON object of type
|
|
121
|
+
Returns a JSON object of type
|
|
105
122
|
|
|
106
123
|
```typescript
|
|
107
124
|
{
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
THIRD-PARTY LICENSES
|
|
2
|
+
|
|
3
|
+
@isaacs/balanced-match@4.0.1
|
|
4
|
+
License: MIT
|
|
5
|
+
Repository: https://github.com/isaacs/balanced-match
|
|
6
|
+
|
|
7
|
+
----------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
@isaacs/brace-expansion@5.0.0
|
|
10
|
+
License: MIT
|
|
11
|
+
|
|
12
|
+
----------------------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
@isaacs/cliui@8.0.2
|
|
15
|
+
License: ISC
|
|
16
|
+
Repository: https://github.com/yargs/cliui
|
|
17
|
+
|
|
18
|
+
----------------------------------------------------------------------
|
|
19
|
+
|
|
20
|
+
ansi-regex@5.0.1
|
|
21
|
+
License: MIT
|
|
22
|
+
Repository: https://github.com/chalk/ansi-regex
|
|
23
|
+
|
|
24
|
+
----------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
ansi-regex@6.1.0
|
|
27
|
+
License: MIT
|
|
28
|
+
Repository: https://github.com/chalk/ansi-regex
|
|
29
|
+
|
|
30
|
+
----------------------------------------------------------------------
|
|
31
|
+
|
|
32
|
+
ansi-styles@4.3.0
|
|
33
|
+
License: MIT
|
|
34
|
+
Repository: https://github.com/chalk/ansi-styles
|
|
35
|
+
|
|
36
|
+
----------------------------------------------------------------------
|
|
37
|
+
|
|
38
|
+
ansi-styles@6.2.1
|
|
39
|
+
License: MIT
|
|
40
|
+
Repository: https://github.com/chalk/ansi-styles
|
|
41
|
+
|
|
42
|
+
----------------------------------------------------------------------
|
|
43
|
+
|
|
44
|
+
color-convert@2.0.1
|
|
45
|
+
License: MIT
|
|
46
|
+
Repository: https://github.com/Qix-/color-convert
|
|
47
|
+
|
|
48
|
+
----------------------------------------------------------------------
|
|
49
|
+
|
|
50
|
+
color-name@1.1.4
|
|
51
|
+
License: MIT
|
|
52
|
+
Repository: https://github.com/colorjs/color-name
|
|
53
|
+
|
|
54
|
+
----------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
cross-spawn@7.0.6
|
|
57
|
+
License: MIT
|
|
58
|
+
Repository: https://github.com/moxystudio/node-cross-spawn
|
|
59
|
+
|
|
60
|
+
----------------------------------------------------------------------
|
|
61
|
+
|
|
62
|
+
devicetree-language-server@0.6.0-beta2
|
|
63
|
+
License: Apache-2.0
|
|
64
|
+
Repository: https://github.com/kylebonnici/dts-lsp
|
|
65
|
+
|
|
66
|
+
----------------------------------------------------------------------
|
|
67
|
+
|
|
68
|
+
diff@8.0.2
|
|
69
|
+
License: BSD-3-Clause
|
|
70
|
+
Repository: https://github.com/kpdecker/jsdiff
|
|
71
|
+
|
|
72
|
+
----------------------------------------------------------------------
|
|
73
|
+
|
|
74
|
+
dts-linter@0.3.0-beta10
|
|
75
|
+
License: Apache-2.0
|
|
76
|
+
Repository: https://github.com/kylebonnici/dts-linter
|
|
77
|
+
|
|
78
|
+
----------------------------------------------------------------------
|
|
79
|
+
|
|
80
|
+
eastasianwidth@0.2.0
|
|
81
|
+
License: MIT
|
|
82
|
+
Repository: https://github.com/komagata/eastasianwidth
|
|
83
|
+
|
|
84
|
+
----------------------------------------------------------------------
|
|
85
|
+
|
|
86
|
+
emoji-regex@8.0.0
|
|
87
|
+
License: MIT
|
|
88
|
+
Repository: https://github.com/mathiasbynens/emoji-regex
|
|
89
|
+
|
|
90
|
+
----------------------------------------------------------------------
|
|
91
|
+
|
|
92
|
+
emoji-regex@9.2.2
|
|
93
|
+
License: MIT
|
|
94
|
+
Repository: https://github.com/mathiasbynens/emoji-regex
|
|
95
|
+
|
|
96
|
+
----------------------------------------------------------------------
|
|
97
|
+
|
|
98
|
+
foreground-child@3.3.1
|
|
99
|
+
License: ISC
|
|
100
|
+
Repository: https://github.com/tapjs/foreground-child
|
|
101
|
+
|
|
102
|
+
----------------------------------------------------------------------
|
|
103
|
+
|
|
104
|
+
glob@11.0.3
|
|
105
|
+
License: ISC
|
|
106
|
+
Repository: https://github.com/isaacs/node-glob
|
|
107
|
+
|
|
108
|
+
----------------------------------------------------------------------
|
|
109
|
+
|
|
110
|
+
is-fullwidth-code-point@3.0.0
|
|
111
|
+
License: MIT
|
|
112
|
+
Repository: https://github.com/sindresorhus/is-fullwidth-code-point
|
|
113
|
+
|
|
114
|
+
----------------------------------------------------------------------
|
|
115
|
+
|
|
116
|
+
isexe@2.0.0
|
|
117
|
+
License: ISC
|
|
118
|
+
Repository: https://github.com/isaacs/isexe
|
|
119
|
+
|
|
120
|
+
----------------------------------------------------------------------
|
|
121
|
+
|
|
122
|
+
jackspeak@4.1.1
|
|
123
|
+
License: BlueOak-1.0.0
|
|
124
|
+
Repository: https://github.com/isaacs/jackspeak
|
|
125
|
+
|
|
126
|
+
----------------------------------------------------------------------
|
|
127
|
+
|
|
128
|
+
lru-cache@11.1.0
|
|
129
|
+
License: ISC
|
|
130
|
+
Repository: https://github.com/isaacs/node-lru-cache
|
|
131
|
+
|
|
132
|
+
----------------------------------------------------------------------
|
|
133
|
+
|
|
134
|
+
minimatch@10.0.3
|
|
135
|
+
License: ISC
|
|
136
|
+
Repository: https://github.com/isaacs/minimatch
|
|
137
|
+
|
|
138
|
+
----------------------------------------------------------------------
|
|
139
|
+
|
|
140
|
+
minipass@7.1.2
|
|
141
|
+
License: ISC
|
|
142
|
+
Repository: https://github.com/isaacs/minipass
|
|
143
|
+
|
|
144
|
+
----------------------------------------------------------------------
|
|
145
|
+
|
|
146
|
+
package-json-from-dist@1.0.1
|
|
147
|
+
License: BlueOak-1.0.0
|
|
148
|
+
Repository: https://github.com/isaacs/package-json-from-dist
|
|
149
|
+
|
|
150
|
+
----------------------------------------------------------------------
|
|
151
|
+
|
|
152
|
+
path-key@3.1.1
|
|
153
|
+
License: MIT
|
|
154
|
+
Repository: https://github.com/sindresorhus/path-key
|
|
155
|
+
|
|
156
|
+
----------------------------------------------------------------------
|
|
157
|
+
|
|
158
|
+
path-scurry@2.0.0
|
|
159
|
+
License: BlueOak-1.0.0
|
|
160
|
+
Repository: https://github.com/isaacs/path-scurry
|
|
161
|
+
|
|
162
|
+
----------------------------------------------------------------------
|
|
163
|
+
|
|
164
|
+
shebang-command@2.0.0
|
|
165
|
+
License: MIT
|
|
166
|
+
Repository: https://github.com/kevva/shebang-command
|
|
167
|
+
|
|
168
|
+
----------------------------------------------------------------------
|
|
169
|
+
|
|
170
|
+
shebang-regex@3.0.0
|
|
171
|
+
License: MIT
|
|
172
|
+
Repository: https://github.com/sindresorhus/shebang-regex
|
|
173
|
+
|
|
174
|
+
----------------------------------------------------------------------
|
|
175
|
+
|
|
176
|
+
signal-exit@4.1.0
|
|
177
|
+
License: ISC
|
|
178
|
+
Repository: https://github.com/tapjs/signal-exit
|
|
179
|
+
|
|
180
|
+
----------------------------------------------------------------------
|
|
181
|
+
|
|
182
|
+
string-width@4.2.3
|
|
183
|
+
License: MIT
|
|
184
|
+
Repository: https://github.com/sindresorhus/string-width
|
|
185
|
+
|
|
186
|
+
----------------------------------------------------------------------
|
|
187
|
+
|
|
188
|
+
string-width@5.1.2
|
|
189
|
+
License: MIT
|
|
190
|
+
Repository: https://github.com/sindresorhus/string-width
|
|
191
|
+
|
|
192
|
+
----------------------------------------------------------------------
|
|
193
|
+
|
|
194
|
+
strip-ansi@6.0.1
|
|
195
|
+
License: MIT
|
|
196
|
+
Repository: https://github.com/chalk/strip-ansi
|
|
197
|
+
|
|
198
|
+
----------------------------------------------------------------------
|
|
199
|
+
|
|
200
|
+
strip-ansi@7.1.0
|
|
201
|
+
License: MIT
|
|
202
|
+
Repository: https://github.com/chalk/strip-ansi
|
|
203
|
+
|
|
204
|
+
----------------------------------------------------------------------
|
|
205
|
+
|
|
206
|
+
vscode-jsonrpc@8.2.1
|
|
207
|
+
License: MIT
|
|
208
|
+
Repository: https://github.com/Microsoft/vscode-languageserver-node
|
|
209
|
+
|
|
210
|
+
----------------------------------------------------------------------
|
|
211
|
+
|
|
212
|
+
which@2.0.2
|
|
213
|
+
License: ISC
|
|
214
|
+
Repository: https://github.com/isaacs/node-which
|
|
215
|
+
|
|
216
|
+
----------------------------------------------------------------------
|
|
217
|
+
|
|
218
|
+
wrap-ansi@7.0.0
|
|
219
|
+
License: MIT
|
|
220
|
+
Repository: https://github.com/chalk/wrap-ansi
|
|
221
|
+
|
|
222
|
+
----------------------------------------------------------------------
|
|
223
|
+
|
|
224
|
+
wrap-ansi@8.1.0
|
|
225
|
+
License: MIT
|
|
226
|
+
Repository: https://github.com/chalk/wrap-ansi
|
|
227
|
+
|
|
228
|
+
----------------------------------------------------------------------
|
|
229
|
+
|
|
230
|
+
zod@3.25.67
|
|
231
|
+
License: MIT
|
|
232
|
+
Repository: https://github.com/colinhacks/zod
|
|
233
|
+
|
|
234
|
+
----------------------------------------------------------------------
|
|
235
|
+
|