@@ -96,10 +96,11 @@ public static ScriptAnalyzer Instance
96
96
/// </summary>
97
97
internal void Initialize < TCmdlet > (
98
98
TCmdlet cmdlet ,
99
- string [ ] customizedRulePath = null ,
99
+ string [ ] customizedRulePath = null ,
100
100
string [ ] includeRuleNames = null ,
101
101
string [ ] excludeRuleNames = null ,
102
102
string [ ] severity = null ,
103
+ bool includeDefaultRules = false ,
103
104
bool suppressedOnly = false ,
104
105
string profile = null )
105
106
where TCmdlet : PSCmdlet , IOutputWriter
@@ -117,6 +118,7 @@ internal void Initialize<TCmdlet>(
117
118
includeRuleNames ,
118
119
excludeRuleNames ,
119
120
severity ,
121
+ includeDefaultRules ,
120
122
suppressedOnly ,
121
123
profile ) ;
122
124
}
@@ -127,10 +129,11 @@ internal void Initialize<TCmdlet>(
127
129
public void Initialize (
128
130
Runspace runspace ,
129
131
IOutputWriter outputWriter ,
130
- string [ ] customizedRulePath = null ,
132
+ string [ ] customizedRulePath = null ,
131
133
string [ ] includeRuleNames = null ,
132
134
string [ ] excludeRuleNames = null ,
133
135
string [ ] severity = null ,
136
+ bool includeDefaultRules = false ,
134
137
bool suppressedOnly = false ,
135
138
string profile = null )
136
139
{
@@ -147,6 +150,7 @@ public void Initialize(
147
150
includeRuleNames ,
148
151
excludeRuleNames ,
149
152
severity ,
153
+ includeDefaultRules ,
150
154
suppressedOnly ,
151
155
profile ) ;
152
156
}
@@ -308,10 +312,11 @@ private void Initialize(
308
312
IOutputWriter outputWriter ,
309
313
PathIntrinsics path ,
310
314
CommandInvocationIntrinsics invokeCommand ,
311
- string [ ] customizedRulePath ,
312
- string [ ] includeRuleNames ,
315
+ string [ ] customizedRulePath ,
316
+ string [ ] includeRuleNames ,
313
317
string [ ] excludeRuleNames ,
314
318
string [ ] severity ,
319
+ bool includeDefaultRules = false ,
315
320
bool suppressedOnly = false ,
316
321
string profile = null )
317
322
{
@@ -358,7 +363,7 @@ private void Initialize(
358
363
359
364
try
360
365
{
361
- this . LoadRules ( this . validationResults , invokeCommand , null == customizedRulePath ? true : false ) ;
366
+ this . LoadRules ( this . validationResults , invokeCommand , includeDefaultRules ) ;
362
367
}
363
368
catch ( Exception ex )
364
369
{
0 commit comments