@@ -275,7 +275,7 @@ private void AnalyzeFile(string filePath)
275275 // Use a List of KVP rather than dictionary, since for a script containing inline functions with same signature, keys clash
276276 List < KeyValuePair < CommandInfo , IScriptExtent > > cmdInfoTable = new List < KeyValuePair < CommandInfo , IScriptExtent > > ( ) ;
277277
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
279279 List < Regex > includeRegexList = new List < Regex > ( ) ;
280280 List < Regex > excludeRegexList = new List < Regex > ( ) ;
281281 if ( includeRule != null )
@@ -358,6 +358,7 @@ private void AnalyzeFile(string filePath)
358358 if ( exclude . IsMatch ( scriptRule . GetName ( ) ) )
359359 {
360360 excludeRegexMatch = true ;
361+ break ;
361362 }
362363 }
363364 if ( ( includeRule == null || includeRule . Contains ( scriptRule . GetName ( ) , StringComparer . OrdinalIgnoreCase ) || includeRegexMatch ) &&
@@ -433,6 +434,7 @@ private void AnalyzeFile(string filePath)
433434 if ( exclude . IsMatch ( commandRule . GetName ( ) ) )
434435 {
435436 excludeRegexMatch = true ;
437+ break ;
436438 }
437439 }
438440 if ( ( includeRule == null || includeRule . Contains ( commandRule . GetName ( ) , StringComparer . OrdinalIgnoreCase ) || includeRegexMatch ) &&
@@ -480,6 +482,7 @@ private void AnalyzeFile(string filePath)
480482 if ( exclude . IsMatch ( tokenRule . GetName ( ) ) )
481483 {
482484 excludeRegexMatch = true ;
485+ break ;
483486 }
484487 }
485488 if ( ( includeRule == null || includeRule . Contains ( tokenRule . GetName ( ) , StringComparer . OrdinalIgnoreCase ) || includeRegexMatch ) &&
@@ -524,6 +527,7 @@ private void AnalyzeFile(string filePath)
524527 if ( exclude . IsMatch ( dscResourceRule . GetName ( ) ) )
525528 {
526529 excludeRegexMatch = true ;
530+ break ;
527531 }
528532 }
529533 if ( ( includeRule == null || includeRule . Contains ( dscResourceRule . GetName ( ) , StringComparer . OrdinalIgnoreCase ) || includeRegexMatch ) &&
0 commit comments