Closed DennisL68 closed 1 year ago
Hi @DennisL68 -- thank you for the issue! I can see we can improve the trailing white space in the generated code to help make the readability better. Thank you for the suggestion!
trailing whitespace in generator fixed in commit 40d62a6d4010dc0160f025a5317966c6ef623879
Fixed/closed - in release: https://www.powershellgallery.com/packages/Microsoft.PowerShell.Crescendo/1.1.0-RC1
@DennisL68 The warnings about plural noun you need to fix in your own code (the source .json). Change the value for Noun for the indicated commands and regerate the module. (for example: change PSConfigRegisterServices to PSConfigRegisterService)
The warnings about ShouldProcess/ShouldContinue require a fix in Crescendo itself. It only checks the SupportsShouldProcess from the .json to see if it should add the SupportsShouldProcess declaration to the generated cmdlet. The generated code always get the $PSCmdlet.ShouldProcess call, instead of being added conditionally. This issue should be reopened (as it didn't address the complete orginal issue) or a new issue should be opened.
Prerequisites
Steps to reproduce
When running the generated code using ScriptAnalyzer I'm greated with a lot of Warnings and Information output.
It's very tedious to walk through the code by hand after each export.
Expected behavior
Actual behavior
Error details
No response
Environment data
Version
1.1.0-Preview01
Visuals
No response