Repository navigation
RFC Draft of dsc lint command - #1766
Open
Gijs Reijn (Gijsreyn) wants to merge 3 commits into
Open
Gijs Reijn (Gijsreyn) wants to merge 3 commits into
Gijs Reijn (Gijsreyn) wants to merge 3 commits into
Conversation
dsc lint commanddsc lint command
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The draft’s lint rules would reject valid case-sensitive instance names, miss ignored instance-level resources on groups and adapters, and produce false schema errors for unresolved expressions.
3 open issues
What changed in this PR
This documentation-only PR proposes dsc lint for checking DSC configuration documents without applying them, with a reusable engine in dsc-lib and a dsclint command plug-in.
Changes:
- Defines command options, diagnostics, rule settings, and exit codes.
- Proposes static and discovery-based rules for configuration documents.
- Outlines library integration, future manifest support, and the relationship to
dsc config validate.
| File | Description |
|---|---|
rfc/draft/RFCNNNN-lint-command.md |
Adds the draft RFC covering linting behavior, architecture, and phased scope. |
Review effort: Balanced
| | `parse-error` | error | Fixed. The text is valid JSON or YAML. | | ||
| | `schema-invalid` | error | Fixed. Every violation of the configuration document schema, with its path. | | ||
| | `unsupported-document-type` | error | Fixed. The `$schema` isn't a manifest schema (first phase). | | ||
| | `duplicate-resource` | error | No two sibling resources share a name and a type (case-insensitive). DSC refuses such documents at runtime ([#842][02]). | |
| | `unknown-resource-type` | warning | Every resource type is installed. A warning, because the document may be valid on the machine it targets. | | ||
| | `unsatisfied-require-version` | warning | An installed version satisfies `requireVersion`. | | ||
| | `deprecated-resource` | warning | No resource type carries a `deprecationMessage`. | | ||
| | `property-schema-mismatch` | error | Literal properties validate against the embedded resource schema; violations under properties that hold expressions are dropped. | |
| | `unsatisfied-require-version` | warning | An installed version satisfies `requireVersion`. | | ||
| | `deprecated-resource` | warning | No resource type carries a `deprecationMessage`. | | ||
| | `property-schema-mismatch` | error | Literal properties validate against the embedded resource schema; violations under properties that hold expressions are dropped. | | ||
| | `nested-resources-unsupported` | warning | Only group and adapter resources declare nested `resources`. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

PR Summary
RFC describing a new command:
dsc lint.