Repository navigation
(GH-579) Add dsc lint as a plug-in command - #1809
Draft
Gijs Reijn (Gijsreyn) wants to merge 9 commits into
Draft
Gijs Reijn (Gijsreyn) wants to merge 9 commits into
Gijs Reijn (Gijsreyn) wants to merge 9 commits into
Conversation
…in/add-dsc-lint-command # Conflicts: # dsc/src/subcommand.rs # xtask/src/schemas/export.rs
…fest Ports the lint settings and `dsclint` tracing to the settings module, adds the `Microsoft.DSC/Lint` plug-in manifest so `dsc lint` runs `dsclint`, and adds Pester tests for the plug-in command.
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
This change:
dsc lintby shippingdsclintwith a plug-in manifest (Microsoft.DSC/Lint).dsclintexecutable #1768 on top of the command plug-ins from (GH-461) Add command plug-ins to extenddscwith new commands #1808: the lint engine indsc-lib, thedsclintexecutable, the schema-error diagnostics and thelint_dsc_configMCP tool.dsclinttracing onto the settings module that landed onmainin (GH-1081) Integrate settings through CLI and lib #1769.dsc lint, and addsdsclintto the Windows test matrix.dsc.exe#461.PR Context
The earlier PR #1768 adds
dsclintas a separate executable. The working group preferred to reach it asdsc lintthrough a plug-in system instead of a built-in subcommand. This PR shows the two together: no linter code is compiled into thedsccommand, anddsc lintreturns the same output and exit code asdsclint.This branch contains the commits of #1808. Until that PR merges, the diff here includes it. Review only the merge commit and what follows.
Remarks on the design
dsclintexecutable #1768. Changes are limited to whatmainmoved since: the settings API, theResourceCapabilityrename, and resource lookup returning a trait object.lint.rulesis now a field of the settings files (machine, user, workspace and policy) and is merged in that order, with policy applied last.lintsection. It now makes that settings file fail to load with a warning, like any other invalid field. (GH-579) Adddsclintexecutable #1768 reported a dedicated lint settings error.dsc --trace-level info lint ...applies to the linter. An option afterlintoverrides it.dsclintand its manifest are at3.4.0-preview.3to matchdsc.dsclintexecutable #1768.Known gaps
dsc help lintprintsUsage: dsclint.exe.lintsettings field has no schema documentation strings yet.