File tree Expand file tree Collapse file tree 3 files changed +39
-14
lines changed
scripts/tests/PSScriptAnalyzer Expand file tree Collapse file tree 3 files changed +39
-14
lines changed Original file line number Diff line number Diff line change @@ -44,16 +44,6 @@ BeforeDiscovery {
4444 Severity = $ruleObject.Severity
4545 Description = $ruleObject.Description
4646 Skip = $skip
47- <#
48- RuleName : PSDSCUseVerboseMessageInDSCResource
49- CommonName : Use verbose message in DSC resource
50- Description : It is a best practice to emit informative, verbose messages in DSC resource functions.
51- This helps in debugging issues when a DSC configuration is executed.
52- SourceType : Builtin
53- SourceName : PSDSC
54- Severity : Information
55- ImplementingType : Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules.UseVerboseMessageInDSCResource
56- #>
5747 }
5848 )
5949 }
Original file line number Diff line number Diff line change 11@ {
2- Rules = @ {
2+ Rules = @ {
33 PSAlignAssignmentStatement = @ {
44 Enable = $true
55 CheckHashtable = $true
4949 IgnoreAssignmentOperatorInsideHashTable = $true
5050 }
5151 }
52- ExcludeRules = @ (
52+ ExcludeRules = @ (
5353 ' PSUseConsistentWhitespace'
5454 )
55- IncludeRules = @ (
55+ IncludeRules = @ (
5656 ' PSAvoidSemicolonsAsLineTerminators'
5757 ' PSPlaceCloseBrace'
5858 ' PSPlaceOpenBrace'
5959 ' PSProvideCommentHelp'
6060 ' PSUseConsistentIndentation'
6161 )
62- Severity = @ (
62+ Severity = @ (
6363 ' Error'
6464 ' Warning'
6565 )
Original file line number Diff line number Diff line change 1+ ## Schema: Get-ScriptAnalyzerRule
2+
3+ ``` plaintext
4+ RuleName : PSDSCUseVerboseMessageInDSCResource
5+ CommonName : Use verbose message in DSC resource
6+ Description : It is a best practice to emit informative, verbose messages in DSC resource functions.
7+ This helps in debugging issues when a DSC configuration is executed.
8+ SourceType : Builtin
9+ SourceName : PSDSC
10+ Severity : Information
11+ ImplementingType : Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules.UseVerboseMessageInDSCResource
12+ ```
13+
14+ ## Schema: Invoke-ScriptAnalyzer ERROR record
15+
16+ ``` plaintext
17+ Line : 1
18+ Column : 1
19+ Message : The member 'ModuleVersion' is not present in the module manifest. This member must exist and be assigned a
20+ version number of the form 'n.n.n.n'. Add the missing member to the file
21+ ' C:\Repos\GitHub\PSModule\Action\Test-PSModule\tests\srcWithManifestTestRepo\src\manifest.psd1'.
22+ Extent : @{
23+ Author = 'Author'
24+ }
25+ RuleName : PSMissingModuleManifestField
26+ Severity : Warning
27+ ScriptName : manifest.psd1
28+ ScriptPath : C:\Repos\GitHub\PSModule\Action\Test-PSModule\tests\srcWithManifestTestRepo\src\manifest.psd1
29+ RuleSuppressionID :
30+ SuggestedCorrections : {
31+ # Version number of this module.
32+ ModuleVersion = '1.0.0.0'
33+ }
34+ IsSuppressed : False
35+ ```
You can’t perform that action at this time.
0 commit comments