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
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,8 @@ Always exits with code `0`, even when validation errors are found. Useful in CI
104
104
105
105
Verify that a set of files or directories matching glob patterns exist on disk **and** are referenced as `<File>` entries in the solution file(s) being validated. Any failure is reported as a normal validation error (exit code `1`) that also appears in SonarQube reports.
106
106
107
-
-**Reference check** — for each matched file that is not referenced as `<File Path="...">` in the `.slnx`, a `SLNX021` (`RequiredFileNotReferencedInSolution`) error is added. The error message shows the exact `<File>` element that should be added. If the pattern matches no files, the check is skipped silently (not an error).
107
+
-**Disk check** — if a **literal** (non-wildcard) pattern matches no files on disk, a `SLNX020` (`RequiredFileDoesntExistOnSystem`) error is added. If the pattern contains wildcards (`*` or `?`) and matches no files, the check is skipped silently — zero matches is not an error.
108
+
-**Reference check** — for each matched file that is not referenced as `<File Path="...">` in the `.slnx`, a `SLNX021` (`RequiredFileNotReferencedInSolution`) error is added. The error message shows the exact `<File>` element that should be added.
108
109
109
110
Relative paths in the `.slnx` are resolved relative to the solution file's location.
|`0`| All matched files are referenced in the solution (or no files matched the pattern). |
153
-
|`1`| Any validation error — including required files not referenced. |
153
+
|`0`| All matched files are referenced in the solution (or a wildcard pattern matched no files). |
154
+
|`1`| Any validation error — including a literal required file not existing or matched files not referenced. |
154
155
155
156
### Severity override flags
156
157
@@ -402,6 +403,7 @@ The following are **intentionally out of scope** because the toolchain already h
402
403
|`SLNX011`|`ReferencedFileNotFound`| A file referenced in `<File Path="...">` does not exist on disk. |
403
404
|`SLNX012`|`InvalidWildcardUsage`| A `<File Path="...">` contains a wildcard pattern (see [`examples/invalid-wildcard.slnx`](examples/invalid-wildcard.slnx)). |
404
405
|`SLNX013`|`XsdViolation`| The XML structure violates the schema, e.g. `<Folder>` inside `<Folder>` (see [`examples/invalid-xsd.slnx`](examples/invalid-xsd.slnx)). |
406
+
|`SLNX020`|`RequiredFileDoesntExistOnSystem`| A literal (non-wildcard) `--required-files` pattern matched no files on the file system. |
405
407
|`SLNX021`|`RequiredFileNotReferencedInSolution`| A `--required-files` matched file exists on disk but is not referenced as a `<File>` element in the solution. |
0 commit comments