Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upcodeql run test doesn't match absolute fs paths in graph queries #36
Comments
|
To clarify: |
|
The results comparison for graph queries is not entirely straightforward, and I'm not sure I fully understand the subtleties it has to deal with. @dbartol, do you have a clear enough understanding of the problem here to figure out what would be involved in solving it? |
|
I think the difference is that we only replace the location in graph queries, but we replace all strings with the file location in normal queries. |
Per @max-schaefer
codeql run testshould adapt queries that emit absolute FS paths such that they pass when run in a different environment. For example my test emits# 0| [File] /home/chris/codeql-home/codeql-go/ql/test/library-tests/semmle/go/PrintAst/input.gobut the test doesn't work when the.expectedfile uses a truncated relative version of that path, or when it uses a different absolute path and the .actual uses the absolute path appropriate to a different environment.