Skip to content

Commit 0411421

Browse files
committed
remove cache stuff
1 parent 79d9b3a commit 0411421

File tree

1 file changed

+3
-26
lines changed

1 file changed

+3
-26
lines changed

scripts/PSCodingStandards/Get-RuleForPath.ps1

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
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
3431
function 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

0 commit comments

Comments
 (0)