-
Notifications
You must be signed in to change notification settings - Fork 393
Add suggested correction to PSMissingModuleManifestField rule #515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add suggested correction to PSMissingModuleManifestField rule #515
Conversation
* Modifies the implmentation to add description and other minor changes * Adds test cases to verify the correction extent of the rule
Reviewed 4 of 4 files at r1. Comments from Reviewable |
Review status: Comments from Reviewable |
Review status: all files reviewed at latest revision, 2 unresolved discussions, all commit checks successful. Rules/MissingModuleManifestField.cs, line 78 [r1] (raw file): Rules/MissingModuleManifestField.cs, line 86 [r1] (raw file): Comments from Reviewable |
Since this rule seems to be specifically about module version, should you make the rule name specific to that as well or are you planning to look for other missing fields in the future? Review status: all files reviewed at latest revision, 3 unresolved discussions. Tests/Rules/AvoidUnloadableModuleOrMissingRequiredFieldInManifest.tests.ps1, line 29 [r1] (raw file): Comments from Reviewable |
My hopes (and what I believe was the intent) was that this rule would identify missing fields in future versions as well. Review status: all files reviewed at latest revision, 3 unresolved discussions. Comments from Reviewable |
According to Test-ModuleManifest, a module manifest missing only the ModuleVersion field is an invalid manifest. And as of now this rule is just trying to warn the user of the invalidity of the module. However, going forward we would like to add other fields to this rule which can encode the "best practices" while authoring a module. Review status: all files reviewed at latest revision, 3 unresolved discussions. Rules/MissingModuleManifestField.cs, line 78 [r1] (raw file): Rules/MissingModuleManifestField.cs, line 86 [r1] (raw file): Comments from Reviewable |
Rules/MissingModuleManifestField.cs, line 86 [r1] (raw file): Comments from Reviewable |
Review status: all files reviewed at latest revision, 3 unresolved discussions. Rules/MissingModuleManifestField.cs, line 86 [r1] (raw file): Comments from Reviewable |
* Insert ModuleVersion field at the end of the hashtable instead of the beginning * Fix MissingModuleManifest test case
@raghushantha @lzybkr @daviwil Thanks for the review. |
The rule is triggered whenever a module manifest doesn't contain module version. This commit sets the suggestedCorrections property to suggest a ModuleVersion field to the manifest.
Resolves #512
This change is