Skip to content

RFC Draft of dsc lint command - #1766

Open
Gijs Reijn (Gijsreyn) wants to merge 3 commits into
PowerShell:mainfrom
Gijsreyn:gh-591/main/rfc-static-linting
Open

Gijs Reijn (Gijsreyn) wants to merge 3 commits into
PowerShell:mainfrom
Gijsreyn:gh-591/main/rfc-static-linting

Conversation

@Gijsreyn

Copy link
Copy Markdown
Collaborator

PR Summary

RFC describing a new command: dsc lint.

@SteveL-MSFT Steve Lee (SteveL-MSFT) moved this from Todo to RFC in DSC Working Group Oct 20, 2026
@SteveL-MSFT Steve Lee (SteveL-MSFT) changed the title Draft of dsc lint command RFC Draft of dsc lint command Oct 20, 2026
@Gijsreyn
Gijs Reijn (Gijsreyn) marked this pull request as ready for review November 14, 2026 11:42
Copilot AI balanced review requested due to automatic review settings November 14, 2026 11:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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`. |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: RFC

Development

Successfully merging this pull request may close these issues.

2 participants