Version
CodeQL CLI v2.5.0
Extension version: v1.4.5
Describe the bug
When compilation of a test fails, the extension currently creates an output diff between the expected output and the compilation error, which is pretty pointless and confusing. E.g.:
--- expected
+++ actual
@@ -1,12 +1,1 @@
-| Expressions.java:5:9:5:18 | toString(...) |
-| Expressions.java:9:9:9:13 | ...=... |
-| Expressions.java:10:9:10:11 | ...++ |
-| Expressions.java:11:9:11:20 | new Object(...) |
-| Expressions.java:14:9:14:28 | clone(...) |
+ERROR: no viable parse for input 'a', expecting one of : 'boolean', 'class', 'newtype', 'date', 'float', 'from', 'import', 'int', 'module', 'predicate', 'select', 'string', 'where', Lowerid, Upperid, Atlowerid (Expressions.ql:6,1-2)
It looks like the underlying issue might be caused by the CodeQL CLI which reports this as diff. It appears this is currently 'misused' to perform tests on CodeQL itself, see #608 (comment).
Regardless of whether that is intended or not, the extension could inspect the failureStage of the response, only if it is "failureStage" : "RESULT" the diff should be shown.
To Reproduce
- Create an
.expected file
- Create a query test file containing a compilation error
- Run
codeql test run --format=json
Expected behavior
Only the compilation error is reported, the diff is not shown.
Version
CodeQL CLI v2.5.0
Extension version: v1.4.5
Describe the bug
When compilation of a test fails, the extension currently creates an output diff between the expected output and the compilation error, which is pretty pointless and confusing. E.g.:
It looks like the underlying issue might be caused by the CodeQL CLI which reports this as
diff. It appears this is currently 'misused' to perform tests on CodeQL itself, see #608 (comment).Regardless of whether that is intended or not, the extension could inspect the
failureStageof the response, only if it is"failureStage" : "RESULT"the diff should be shown.To Reproduce
.expectedfilecodeql test run --format=jsonExpected behavior
Only the compilation error is reported, the diff is not shown.