File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
scripts/PSCodingStandards Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -85,15 +85,14 @@ function Get-RuleForPath {
85
85
$testDirs = (Get-ATestDirectory - RuleObject $q - Language $Language )
86
86
foreach ($testDirectory in $testDirs ){
87
87
# resolve path to be compatible
88
- $testPath = (Join-Path (Resolve-Path . - Relative) $testDirectory ) + [ IO.Path ]::DirectorySeparatorChar
88
+ $testPath = (Join-Path (Resolve-Path . - Relative) $testDirectory )
89
89
90
- # see if the TEST directory is a substring of the full path
91
- if ($modifiedPath.StartsWith ($testPath )){
90
+ if ((Split-Path $modifiedPath - Parent) -eq $testPath ){
92
91
$matchingRules += $q
93
92
continue
94
93
}
95
94
96
- if ($modifiedPathWithReplacement.StartsWith ( $testPath ) ){
95
+ if (( Split-Path $modifiedPathWithReplacement - Parent) -eq $testPath ){
97
96
$matchingRules += $q
98
97
continue
99
98
}
You can’t perform that action at this time.
0 commit comments