factoring in the sub dirs · github/codeql-coding-standards@942e24d · GitHub
Skip to content

Commit 942e24d

Browse files
committed
factoring in the sub dirs
1 parent 9620206 commit 942e24d

4 files changed

Lines changed: 137 additions & 116 deletions

File tree

Lines changed: 20 additions & 0 deletions

‎scripts/PSCodingStandards/Get-RuleForPath.ps1‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,21 @@ function Get-RuleForPath {
5959
foreach($q in $allQueries){
6060

6161
# get test directory
62-
$testDirectory = (Get-TestDirectory -RuleObject $q -Language $Language)
63-
# resolve path to be compatible
64-
$testPath = Join-Path (Resolve-Path . -Relative) $testDirectory
62+
$testDirs = (Get-ATestDirectory -RuleObject $q -Language $Language)
63+
foreach($testDirectory in $testDirs){
64+
# resolve path to be compatible
65+
$testPath = Join-Path (Resolve-Path . -Relative) $testDirectory
6566

66-
# see if the TEST directory is a substring of the full path
67-
if($modifiedPath.StartsWith($testPath)){
68-
$matchingRules += $q
69-
continue
70-
}
67+
# see if the TEST directory is a substring of the full path
68+
if($modifiedPath.StartsWith($testPath)){
69+
$matchingRules += $q
70+
continue
71+
}
7172

72-
if($modifiedPathWithReplacement.StartsWith($testPath)){
73-
$matchingRules += $q
74-
continue
73+
if($modifiedPathWithReplacement.StartsWith($testPath)){
74+
$matchingRules += $q
75+
continue
76+
}
7577
}
7678
}
7779

‎scripts/matrix_testing/Config.ps1‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ $COMPILER_ARGS = @{
2222

2323
"c" = @{
2424
"gcc" = "-fsyntax-only";
25-
"clang" = "-fsyntax-only";
26-
25+
"clang" = "-fsyntax-only";
2726
};
2827

2928
}

‎scripts/matrix_testing/CreateMatrixTestReport.ps1‎

Lines changed: 103 additions & 103 deletions

0 commit comments

Comments
 (0)