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 28
28
# is a substring of the path once the substitution `/src/` -> `/test/` is
29
29
# applied
30
30
31
- $global :ruleCacheC = $null ;
32
- $global :ruleCacheCPP = $null ;
33
- $global :enableRuleCache = $false
34
31
function Get-RuleForPath {
35
32
param ([Parameter (Mandatory )]
36
33
[string ]
@@ -44,32 +41,12 @@ function Get-RuleForPath {
44
41
$allQueries = @ ()
45
42
$queriesToCheck = @ ()
46
43
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
- }
55
44
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
71
47
}
72
48
49
+
73
50
$modifiedPathWithReplacement = Join-Path (Resolve-Path . - Relative) $Path
74
51
# replace "src" with "test" to make it match up
75
52
$sep = [IO.Path ]::DirectorySeparatorChar
You can’t perform that action at this time.
0 commit comments