DSC icon indicating copy to clipboard operation
DSC copied to clipboard

static linting for configuration

Open SteveL-MSFT opened this issue 1 year ago • 2 comments

Summary of the new feature / enhancement

Could be dsc lint including the rule:

  • If --target-path is used, ensure targetPath() is used somewhere in an expression within the config

Alternatively, maybe a Bicep extension could have linting.

Proposed technical implementation details (optional)

No response

SteveL-MSFT avatar Oct 30 '24 21:10 SteveL-MSFT

Seems like Bicep has built-in linting rules, so maybe we could extend those to support DSC specific cases like above

cc @andyleejordan

SteveL-MSFT avatar Mar 26 '25 18:03 SteveL-MSFT

If we do support a comman, should it be developed as an extension, or surfaced as part of the core dsc executable?

I do think that even if we can get linting functional through bicep we might want to have a separate command option, as a linting tool for configurations and manifests would be valuable.

michaeltlombardi avatar Mar 27 '25 13:03 michaeltlombardi

I suspect there will be a strong yaml/json config community - as much as I might prefer Bicep, I see many folks that do prefer to work in yaml. I'm open to community feedback but regardless of Bicep I think we should have good linting.

theJasonHelmick avatar Jul 03 '25 19:07 theJasonHelmick