File tree Expand file tree Collapse file tree 1 file changed +3
-26
lines changed
scripts/PSCodingStandards Expand file tree Collapse file tree 1 file changed +3
-26
lines changed Original file line number Diff line number Diff line change 2828# is a substring of the path once the substitution `/src/` -> `/test/` is
2929# applied
3030
31- $global :ruleCacheC = $null ;
32- $global :ruleCacheCPP = $null ;
33- $global :enableRuleCache = $false
3431function Get-RuleForPath {
3532 param ([Parameter (Mandatory )]
3633 [string ]
@@ -44,32 +41,12 @@ function Get-RuleForPath {
4441 $allQueries = @ ()
4542 $queriesToCheck = @ ()
4643
47- if ($global :enableRuleCache ){
48- # load all the queries
49- if ($Language -eq ' cpp' ){
50- $ruleCache = $global :ruleCacheCPP
51- }else {
52- $ruleCache = $global :ruleCacheC
53- }
54- }
5544
56- if (-not $ruleCache ){
57-
58- foreach ($s in $AVAILABLE_SUITES ) {
59- $allQueries += Get-RulesInSuite - Suite $s - Language $Language
60- }
61-
62- if ($global :enableRuleCache ){
63- if ($Language -eq ' cpp' ){
64- $global :ruleCacheCPP = $allQueries
65- }else {
66- $global :ruleCacheC = $allQueries
67- }
68- }
69- }else {
70- $allQueries = $ruleCache
45+ foreach ($s in $AVAILABLE_SUITES ) {
46+ $allQueries += Get-RulesInSuite - Suite $s - Language $Language
7147 }
7248
49+
7350 $modifiedPathWithReplacement = Join-Path (Resolve-Path . - Relative) $Path
7451 # replace "src" with "test" to make it match up
7552 $sep = [IO.Path ]::DirectorySeparatorChar
You can’t perform that action at this time.
0 commit comments