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 {
8585 $testDirs = (Get-ATestDirectory - RuleObject $q - Language $Language )
8686 foreach ($testDirectory in $testDirs ){
8787 # resolve path to be compatible
88- $testPath = (Join-Path (Resolve-Path . - Relative) $testDirectory ) + [ IO.Path ]::DirectorySeparatorChar
88+ $testPath = (Join-Path (Resolve-Path . - Relative) $testDirectory )
8989
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 ){
9291 $matchingRules += $q
9392 continue
9493 }
9594
96- if ($modifiedPathWithReplacement.StartsWith ( $testPath ) ){
95+ if (( Split-Path $modifiedPathWithReplacement - Parent) -eq $testPath ){
9796 $matchingRules += $q
9897 continue
9998 }
You can’t perform that action at this time.
0 commit comments