@@ -275,7 +275,7 @@ private void AnalyzeFile(string filePath)
275
275
// Use a List of KVP rather than dictionary, since for a script containing inline functions with same signature, keys clash
276
276
List < KeyValuePair < CommandInfo , IScriptExtent > > cmdInfoTable = new List < KeyValuePair < CommandInfo , IScriptExtent > > ( ) ;
277
277
278
- //Check wild card input for the Include/ExcludRules and create regex match patterns
278
+ //Check wild card input for the Include/ExcludeRules and create regex match patterns
279
279
List < Regex > includeRegexList = new List < Regex > ( ) ;
280
280
List < Regex > excludeRegexList = new List < Regex > ( ) ;
281
281
if ( includeRule != null )
@@ -358,6 +358,7 @@ private void AnalyzeFile(string filePath)
358
358
if ( exclude . IsMatch ( scriptRule . GetName ( ) ) )
359
359
{
360
360
excludeRegexMatch = true ;
361
+ break ;
361
362
}
362
363
}
363
364
if ( ( includeRule == null || includeRule . Contains ( scriptRule . GetName ( ) , StringComparer . OrdinalIgnoreCase ) || includeRegexMatch ) &&
@@ -433,6 +434,7 @@ private void AnalyzeFile(string filePath)
433
434
if ( exclude . IsMatch ( commandRule . GetName ( ) ) )
434
435
{
435
436
excludeRegexMatch = true ;
437
+ break ;
436
438
}
437
439
}
438
440
if ( ( includeRule == null || includeRule . Contains ( commandRule . GetName ( ) , StringComparer . OrdinalIgnoreCase ) || includeRegexMatch ) &&
@@ -480,6 +482,7 @@ private void AnalyzeFile(string filePath)
480
482
if ( exclude . IsMatch ( tokenRule . GetName ( ) ) )
481
483
{
482
484
excludeRegexMatch = true ;
485
+ break ;
483
486
}
484
487
}
485
488
if ( ( includeRule == null || includeRule . Contains ( tokenRule . GetName ( ) , StringComparer . OrdinalIgnoreCase ) || includeRegexMatch ) &&
@@ -524,6 +527,7 @@ private void AnalyzeFile(string filePath)
524
527
if ( exclude . IsMatch ( dscResourceRule . GetName ( ) ) )
525
528
{
526
529
excludeRegexMatch = true ;
530
+ break ;
527
531
}
528
532
}
529
533
if ( ( includeRule == null || includeRule . Contains ( dscResourceRule . GetName ( ) , StringComparer . OrdinalIgnoreCase ) || includeRegexMatch ) &&
0 commit comments