File tree Expand file tree Collapse file tree 2 files changed +6
-14
lines changed
scripts/tests/PSScriptAnalyzer Expand file tree Collapse file tree 2 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -27,15 +27,12 @@ BeforeDiscovery {
2727 $skip = $true
2828 } elseif ($settings.Severity -and $ruleObject.Severity -notin $settings.Severity ) {
2929 $skip = $true
30- } elseif ($settings.SourceType -and $ruleObject.SourceType -notin $settings.SourceType ) {
31- $skip = $true
32- } elseif ($settings.SourceName -and $ruleObject.SourceName -notin $settings.SourceName ) {
33- $skip = $true
3430 } elseif ($settings.Rules -and $settings.Rules.ContainsKey ($ruleObject.RuleName ) -and -not $settings.Rules [$ruleObject.RuleName ].Enabled) {
3531 $skip = $true
3632 } else {
3733 $skip = $false
3834 }
35+
3936 $rules.Add (
4037 [ordered ]@ {
4138 RuleName = $ruleObject.RuleName
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- IncludedRules = @ (
55+ IncludeRules = @ (
5656 ' PSAvoidSemicolonsAsLineTerminators'
5757 ' PSPlaceCloseBrace'
5858 ' PSPlaceOpenBrace'
5959 ' PSProvideCommentHelp'
6060 ' PSUseConsistentIndentation'
6161 )
62- Severity = @ (
62+ IncludeDefaultRules = $true
63+ Severity = @ (
6364 ' Error'
6465 ' Warning'
6566 )
66- SourceType = @ (
67- ' Builtin'
68- )
69- SourceName = @ (
70- ' PS'
71- )
7267}
You can’t perform that action at this time.
0 commit comments