dts-linter 0.4.1 → 0.5.1
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 +33 -19
- package/dist/THIRD_PARTY_LICENSES.txt +3 -3
- package/dist/dts-linter.js +57 -42
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# DTS Linter
|
|
4
4
|
|
|
5
|
-
A comprehensive DeviceTree linter and formatter that provides syntax checking, formatting, and diagnostic capabilities for DeviceTree Source (.dts), DeviceTree Source Include (.dtsi), and
|
|
5
|
+
A comprehensive DeviceTree linter and formatter that provides syntax checking, formatting, and diagnostic capabilities for DeviceTree Source (.dts), DeviceTree Source Include (.dtsi), overlay files and ZMK .keymap.
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
@@ -35,23 +35,37 @@ dts-linter --formatFixAll
|
|
|
35
35
|
|
|
36
36
|
### Command Line Options
|
|
37
37
|
|
|
38
|
-
| Option
|
|
39
|
-
|
|
|
40
|
-
| `--file`
|
|
41
|
-
| `--
|
|
42
|
-
| `--
|
|
43
|
-
| `--
|
|
44
|
-
| `--
|
|
45
|
-
| `--
|
|
46
|
-
| `--
|
|
47
|
-
| `--
|
|
48
|
-
| `--
|
|
49
|
-
| `--
|
|
50
|
-
| `--
|
|
51
|
-
| `--
|
|
52
|
-
| `--
|
|
53
|
-
| `--
|
|
54
|
-
| `--
|
|
38
|
+
| Option | Type | Default | Description |
|
|
39
|
+
| ------------------------------------- | --------------------------------- | -------------------------- | -------------------------------------------------------------------------------------------------- |
|
|
40
|
+
| `--file` | string | Auto-discover | List of input files (can be repeated) |
|
|
41
|
+
| `--filetypes` | string | `dts,dtsi,overlay,keymap` | Comma-separated file extensions to search when `--file` is not set |
|
|
42
|
+
| `--cwd` | string | `process.cwd()` | Set the current working directory |
|
|
43
|
+
| `--include` | string | `[]` | Paths to resolve includes (absolute or relative to CWD, can be repeated) |
|
|
44
|
+
| `--binding` | string | `[]` | Zephyr binding root directories (absolute or relative to CWD, can be repeated) |
|
|
45
|
+
| `--logLevel` | `none\|verbose` | `none` | Set the logging verbosity |
|
|
46
|
+
| `--format` | boolean | `false` | Format the specified files (automatically set to true when formatFixAll) |
|
|
47
|
+
| `--formatFixAll` | boolean | `false` | Apply formatting changes directly to files |
|
|
48
|
+
| `--wordWrapColumn` | number | `100` | Column at which to wrap long lines when formatting |
|
|
49
|
+
| `--tabSize` | number | `8` | Number of spaces per indentation level |
|
|
50
|
+
| `--insertSpaces` | boolean | `false` | Use spaces instead of tabs for indentation |
|
|
51
|
+
| `--disableBaseFormattingRules` | boolean | `false` | Disable base formatting rules |
|
|
52
|
+
| `--disableIndentExpressions` | boolean | `false` | Disable indentation for expressions when formatting |
|
|
53
|
+
| `--disableRemoveDuplicateProperties` | boolean | `false` | Disable removal of duplicate properties in the same scope |
|
|
54
|
+
| `--disableRemoveEmptyReferences` | boolean | `false` | Disable removal of empty references |
|
|
55
|
+
| `--enableRemoveEmptyNodes` | boolean | `false` | Enable removal of empty nodes |
|
|
56
|
+
| `--enableRemoveEmptyRoots` | boolean | `false` | Enable removal of empty root nodes |
|
|
57
|
+
| `--enableSortNodesAndProperties` | boolean | `false` | Enable sorting of nodes and properties |
|
|
58
|
+
| `--sortNodesNodesBy` | `none\|name\|address` | `none` | When sorting nodes, sort by name or address |
|
|
59
|
+
| `--enableSortPropertiesAlphabetically`| boolean | `false` | Enable sorting of properties alphabetically |
|
|
60
|
+
| `--diagnostics` | boolean | `false` | Show basic syntax diagnostics |
|
|
61
|
+
| `--diagnosticsFull` | boolean | `false` | Show full diagnostics including semantic analysis (requires --include, --binding for proper usage) |
|
|
62
|
+
| `--diagnosticsConfig` | string | - | Path to json file with test case configurations for complex diagnostics |
|
|
63
|
+
| `--showInfoDiagnostics` | boolean | `false` | Show information-level diagnostics |
|
|
64
|
+
| `--patchFile` | string | - | Write formatting diff output to file |
|
|
65
|
+
| `--outputFormat` | `auto\|pretty\|annotations\|json` | `auto` | Output format type |
|
|
66
|
+
| `--threads` | number | `1` | Number of parallel LSP instances to use for processing files |
|
|
67
|
+
| `--version` | boolean | `false` | Show version information |
|
|
68
|
+
| `--help` | boolean | `false` | Show help information |
|
|
55
69
|
|
|
56
70
|
### Examples
|
|
57
71
|
|
|
@@ -87,7 +101,7 @@ dts-linter --format --diagnostics --threads 4
|
|
|
87
101
|
|
|
88
102
|
## File Discovery
|
|
89
103
|
|
|
90
|
-
When no `--file` option is provided, the linter automatically searches for DeviceTree files using the pattern `**/*.{dts,dtsi,overlay}` or `**/*.
|
|
104
|
+
When no `--file` option is provided, the linter automatically searches for DeviceTree files using the pattern `**/*.{dts,dtsi,overlay,keymap}` (or `**/*.dts` when using `--diagnosticsFull`) in the current working directory. Use `--filetypes` to customize which extensions are searched.
|
|
91
105
|
|
|
92
106
|
## Performance and Threading
|
|
93
107
|
|
|
@@ -36,7 +36,7 @@ Repository: https://github.com/juliangruber/balanced-match
|
|
|
36
36
|
|
|
37
37
|
----------------------------------------------------------------------
|
|
38
38
|
|
|
39
|
-
brace-expansion@5.0.
|
|
39
|
+
brace-expansion@5.0.6
|
|
40
40
|
License: MIT
|
|
41
41
|
Repository: https://github.com/juliangruber/brace-expansion
|
|
42
42
|
|
|
@@ -60,7 +60,7 @@ Repository: https://github.com/moxystudio/node-cross-spawn
|
|
|
60
60
|
|
|
61
61
|
----------------------------------------------------------------------
|
|
62
62
|
|
|
63
|
-
devicetree-language-server@0.
|
|
63
|
+
devicetree-language-server@0.9.4
|
|
64
64
|
License: Apache-2.0
|
|
65
65
|
Repository: https://github.com/kylebonnici/dts-lsp
|
|
66
66
|
|
|
@@ -72,7 +72,7 @@ Repository: https://github.com/kpdecker/jsdiff
|
|
|
72
72
|
|
|
73
73
|
----------------------------------------------------------------------
|
|
74
74
|
|
|
75
|
-
dts-linter@0.
|
|
75
|
+
dts-linter@0.5.1
|
|
76
76
|
License: Apache-2.0
|
|
77
77
|
Repository: https://github.com/kylebonnici/dts-linter
|
|
78
78
|
|