Skip to content

Commit db5e452

Browse files
authored
Merge pull request #17536 from hvitved/ql-test-source-root
Adapt to `sourceLocationPrefix` change in `qltest`
2 parents c629867 + d0ca39f commit db5e452

File tree

27 files changed

+185
-191
lines changed

27 files changed

+185
-191
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| c.c | library-tests/files/c.c | CFile, MetricFile | C | | |
2-
| files1.cpp | library-tests/files/files1.cpp | CppFile, MetricFile | C++ | swap | t |
3-
| files1.h | library-tests/files/files1.h | HeaderFile, MetricFile | | swap | |
4-
| files2.cpp | library-tests/files/files2.cpp | CppFile, MetricFile | C++ | g | x, y |
1+
| c.c | c.c | CFile, MetricFile | C | | |
2+
| files1.cpp | files1.cpp | CppFile, MetricFile | C++ | swap | t |
3+
| files1.h | files1.h | HeaderFile, MetricFile | | swap | |
4+
| files2.cpp | files2.cpp | CppFile, MetricFile | C++ | g | x, y |
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
| containserror.cpp:0:0:0:0 | containserror.cpp | query-tests/Diagnostics/containserror.cpp | fromSource, normalTermination |
2-
| containswarning.cpp:0:0:0:0 | containswarning.cpp | query-tests/Diagnostics/containswarning.cpp | fromSource, normalTermination |
3-
| doesnotcompile.cpp:0:0:0:0 | doesnotcompile.cpp | query-tests/Diagnostics/doesnotcompile.cpp | ExtractionProblem (severity 1), fromSource, normalTermination |
1+
| containserror.cpp:0:0:0:0 | containserror.cpp | containserror.cpp | fromSource, normalTermination |
2+
| containswarning.cpp:0:0:0:0 | containswarning.cpp | containswarning.cpp | fromSource, normalTermination |
3+
| doesnotcompile.cpp:0:0:0:0 | doesnotcompile.cpp | doesnotcompile.cpp | ExtractionProblem (severity 1), fromSource, normalTermination |
44
| file://:0:0:0:0 | | | |
5-
| header.h:0:0:0:0 | header.h | query-tests/Diagnostics/header.h | fromSource |
6-
| successful.cpp:0:0:0:0 | successful.cpp | query-tests/Diagnostics/successful.cpp | fromSource, normalTermination |
5+
| header.h:0:0:0:0 | header.h | header.h | fromSource |
6+
| successful.cpp:0:0:0:0 | successful.cpp | successful.cpp | fromSource, normalTermination |
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
| comment_prototypes.c:29:6:29:11 | proto6 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller1.c:9:5:9:10 | call to proto6 | query-tests/Documentation/DocumentApi/comment_prototypes_caller1.c |
2-
| comment_prototypes.c:29:6:29:11 | proto6 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller2.c:9:5:9:10 | call to proto6 | query-tests/Documentation/DocumentApi/comment_prototypes_caller2.c |
3-
| comment_prototypes.c:34:6:34:11 | proto7 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller1.c:10:5:10:10 | call to proto7 | query-tests/Documentation/DocumentApi/comment_prototypes_caller1.c |
4-
| comment_prototypes.c:34:6:34:11 | proto7 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller2.c:10:5:10:10 | call to proto7 | query-tests/Documentation/DocumentApi/comment_prototypes_caller2.c |
5-
| comment_prototypes.c:45:6:45:11 | proto9 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller1.c:12:5:12:10 | call to proto9 | query-tests/Documentation/DocumentApi/comment_prototypes_caller1.c |
6-
| comment_prototypes.c:45:6:45:11 | proto9 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller2.c:12:5:12:10 | call to proto9 | query-tests/Documentation/DocumentApi/comment_prototypes_caller2.c |
7-
| comment_prototypes.c:50:6:50:12 | proto10 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller1.c:13:5:13:11 | call to proto10 | query-tests/Documentation/DocumentApi/comment_prototypes_caller1.c |
8-
| comment_prototypes.c:50:6:50:12 | proto10 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller2.c:13:5:13:11 | call to proto10 | query-tests/Documentation/DocumentApi/comment_prototypes_caller2.c |
9-
| comment_prototypes.c:55:6:55:12 | proto11 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller1.c:14:5:14:11 | call to proto11 | query-tests/Documentation/DocumentApi/comment_prototypes_caller1.c |
10-
| comment_prototypes.c:55:6:55:12 | proto11 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller2.c:14:5:14:11 | call to proto11 | query-tests/Documentation/DocumentApi/comment_prototypes_caller2.c |
11-
| comment_prototypes.c:66:6:66:12 | proto13 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller1.c:16:5:16:11 | call to proto13 | query-tests/Documentation/DocumentApi/comment_prototypes_caller1.c |
12-
| comment_prototypes.c:66:6:66:12 | proto13 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller2.c:16:5:16:11 | call to proto13 | query-tests/Documentation/DocumentApi/comment_prototypes_caller2.c |
13-
| definition.c:2:6:2:7 | f1 | Functions called from other files should be documented (called from $@). | user1.c:9:5:9:6 | call to f1 | query-tests/Documentation/DocumentApi/user1.c |
14-
| definition.c:2:6:2:7 | f1 | Functions called from other files should be documented (called from $@). | user2.c:7:5:7:6 | call to f1 | query-tests/Documentation/DocumentApi/user2.c |
15-
| definition.c:32:6:32:7 | f6 | Functions called from other files should be documented (called from $@). | user1.c:14:5:14:6 | call to f6 | query-tests/Documentation/DocumentApi/user1.c |
16-
| definition.c:32:6:32:7 | f6 | Functions called from other files should be documented (called from $@). | user2.c:10:5:10:6 | call to f6 | query-tests/Documentation/DocumentApi/user2.c |
1+
| comment_prototypes.c:29:6:29:11 | proto6 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller1.c:9:5:9:10 | call to proto6 | comment_prototypes_caller1.c |
2+
| comment_prototypes.c:29:6:29:11 | proto6 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller2.c:9:5:9:10 | call to proto6 | comment_prototypes_caller2.c |
3+
| comment_prototypes.c:34:6:34:11 | proto7 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller1.c:10:5:10:10 | call to proto7 | comment_prototypes_caller1.c |
4+
| comment_prototypes.c:34:6:34:11 | proto7 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller2.c:10:5:10:10 | call to proto7 | comment_prototypes_caller2.c |
5+
| comment_prototypes.c:45:6:45:11 | proto9 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller1.c:12:5:12:10 | call to proto9 | comment_prototypes_caller1.c |
6+
| comment_prototypes.c:45:6:45:11 | proto9 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller2.c:12:5:12:10 | call to proto9 | comment_prototypes_caller2.c |
7+
| comment_prototypes.c:50:6:50:12 | proto10 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller1.c:13:5:13:11 | call to proto10 | comment_prototypes_caller1.c |
8+
| comment_prototypes.c:50:6:50:12 | proto10 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller2.c:13:5:13:11 | call to proto10 | comment_prototypes_caller2.c |
9+
| comment_prototypes.c:55:6:55:12 | proto11 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller1.c:14:5:14:11 | call to proto11 | comment_prototypes_caller1.c |
10+
| comment_prototypes.c:55:6:55:12 | proto11 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller2.c:14:5:14:11 | call to proto11 | comment_prototypes_caller2.c |
11+
| comment_prototypes.c:66:6:66:12 | proto13 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller1.c:16:5:16:11 | call to proto13 | comment_prototypes_caller1.c |
12+
| comment_prototypes.c:66:6:66:12 | proto13 | Functions called from other files should be documented (called from $@). | comment_prototypes_caller2.c:16:5:16:11 | call to proto13 | comment_prototypes_caller2.c |
13+
| definition.c:2:6:2:7 | f1 | Functions called from other files should be documented (called from $@). | user1.c:9:5:9:6 | call to f1 | user1.c |
14+
| definition.c:2:6:2:7 | f1 | Functions called from other files should be documented (called from $@). | user2.c:7:5:7:6 | call to f1 | user2.c |
15+
| definition.c:32:6:32:7 | f6 | Functions called from other files should be documented (called from $@). | user1.c:14:5:14:6 | call to f6 | user1.c |
16+
| definition.c:32:6:32:7 | f6 | Functions called from other files should be documented (called from $@). | user2.c:10:5:10:6 | call to f6 | user2.c |
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| /query-tests/Metrics/Dependencies/main.cpp<\|>LibC<\|>unknown | 5 |
2-
| /query-tests/Metrics/Dependencies/include.h<\|>LibD<\|>unknown | 1 |
3-
| /query-tests/Metrics/Dependencies/main.cpp<\|>LibA<\|>unknown | 1 |
4-
| /query-tests/Metrics/Dependencies/main.cpp<\|>LibB<\|>unknown | 1 |
1+
| /main.cpp<\|>LibC<\|>unknown | 5 |
2+
| /include.h<\|>LibD<\|>unknown | 1 |
3+
| /main.cpp<\|>LibA<\|>unknown | 1 |
4+
| /main.cpp<\|>LibB<\|>unknown | 1 |
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| /query-tests/Metrics/Dependencies/include.h<\|>LibD<\|>unknown | include.h:0:0:0:0 | include.h |
2-
| /query-tests/Metrics/Dependencies/main.cpp<\|>LibA<\|>unknown | main.cpp:0:0:0:0 | main.cpp |
3-
| /query-tests/Metrics/Dependencies/main.cpp<\|>LibB<\|>unknown | main.cpp:0:0:0:0 | main.cpp |
4-
| /query-tests/Metrics/Dependencies/main.cpp<\|>LibC<\|>unknown | main.cpp:0:0:0:0 | main.cpp |
1+
| /include.h<\|>LibD<\|>unknown | include.h:0:0:0:0 | include.h |
2+
| /main.cpp<\|>LibA<\|>unknown | main.cpp:0:0:0:0 | main.cpp |
3+
| /main.cpp<\|>LibB<\|>unknown | main.cpp:0:0:0:0 | main.cpp |
4+
| /main.cpp<\|>LibC<\|>unknown | main.cpp:0:0:0:0 | main.cpp |

java/ql/lib/semmle/code/java/frameworks/android/Layout.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ private import semmle.code.java.dataflow.DataFlow
66

77
/** An Android Layout XML file. */
88
class AndroidLayoutXmlFile extends XmlFile {
9-
AndroidLayoutXmlFile() { this.getRelativePath().matches("%/res/layout/%.xml") }
9+
AndroidLayoutXmlFile() { this.getRelativePath().regexpMatch("(.*/)?res/layout/.*\\.xml") }
1010
}
1111

1212
/** A component declared in an Android layout file. */

java/ql/test-kotlin1/library-tests/classes/local_anonymous.ql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import java
22

3-
private predicate filterFile(Top t) {
4-
t.getFile().getRelativePath().matches("%/local_anonymous.kt")
5-
}
3+
private predicate filterFile(Top t) { t.getFile().getRelativePath().matches("%local_anonymous.kt") }
64

75
private string isAnonymousType(Type t) {
86
if t instanceof AnonymousClass then result = "anonymous" else result = "not anonymous"

java/ql/test-kotlin2/library-tests/classes/local_anonymous.ql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import java
22

3-
private predicate filterFile(Top t) {
4-
t.getFile().getRelativePath().matches("%/local_anonymous.kt")
5-
}
3+
private predicate filterFile(Top t) { t.getFile().getRelativePath().matches("%local_anonymous.kt") }
64

75
private string isAnonymousType(Type t) {
86
if t instanceof AnonymousClass then result = "anonymous" else result = "not anonymous"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| a.js:0:0:0:0 | a.js | library-tests/Files/a.js |
2-
| b/c.js:0:0:0:0 | b/c.js | library-tests/Files/b/c.js |
1+
| a.js:0:0:0:0 | a.js | a.js |
2+
| b/c.js:0:0:0:0 | b/c.js | b/c.js |

javascript/ql/test/library-tests/Modules/tests.expected

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,16 @@ test_ReExportDeclarations
115115
| m/c.js:5:1:5:30 | export ... '../b'; | m/c.js:5:24:5:29 | '../b' |
116116
| reExportNamespace.js:1:1:1:26 | export ... "./a"; | reExportNamespace.js:1:21:1:25 | "./a" |
117117
test_getAnImportedModule
118-
| library-tests/Modules/b.js | library-tests/Modules/a.js |
119-
| library-tests/Modules/d.js | library-tests/Modules/a.js |
120-
| library-tests/Modules/d.js | library-tests/Modules/b.js |
121-
| library-tests/Modules/es2015_require.js | library-tests/Modules/d.js |
122-
| library-tests/Modules/f.ts | library-tests/Modules/e.js |
123-
| library-tests/Modules/g.ts | library-tests/Modules/f.ts |
124-
| library-tests/Modules/import-indirect-path.js | library-tests/Modules/a.js |
125-
| library-tests/Modules/import-ts-with-js-extension.ts | library-tests/Modules/f.ts |
126-
| library-tests/Modules/m/c.js | library-tests/Modules/b.js |
127-
| library-tests/Modules/reExportNamespaceClient.js | library-tests/Modules/reExportNamespace.js |
118+
| b.js | a.js |
119+
| d.js | a.js |
120+
| d.js | b.js |
121+
| es2015_require.js | d.js |
122+
| f.ts | e.js |
123+
| g.ts | f.ts |
124+
| import-indirect-path.js | a.js |
125+
| import-ts-with-js-extension.ts | f.ts |
126+
| m/c.js | b.js |
127+
| reExportNamespaceClient.js | reExportNamespace.js |
128128
test_getExportedName
129129
| arbitrarySpecifier.ts:5:10:5:30 | Foo_new ... o::new" | Foo::new |
130130
| arbitrarySpecifier.ts:6:13:6:28 | * as "Foo_types" | Foo_types |

0 commit comments

Comments
 (0)