mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
After a `queries.xml` was added to the test directory, `Container.getRelativePath` now considers source files to be relative to the `cpp/test` directory rather than the directory of the `*.ql*` file. This caused some benign test output changes, and it also caused an unwanted alert for `test3.c:14` to appear in `cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/IntegerOverflowTainted.expected`. This alert came about because `inSystemMacroExpansion` holds for files that don't have a relative path, but the pretend system header in `../system_header` now does have a relative path because it's below the `cpp/test` directory. The fix is to add another `queries.xml` just for the directory with the affected test.
5 lines
281 B
Plaintext
5 lines
281 B
Plaintext
| /query-tests/Metrics/Dependencies/main.cpp<\|>LibC<\|>unknown | 5 |
|
|
| /query-tests/Metrics/Dependencies/include.h<\|>LibD<\|>unknown | 1 |
|
|
| /query-tests/Metrics/Dependencies/main.cpp<\|>LibA<\|>unknown | 1 |
|
|
| /query-tests/Metrics/Dependencies/main.cpp<\|>LibB<\|>unknown | 1 |
|