-
Notifications
You must be signed in to change notification settings - Fork 202
Erroneous location mapping #967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Thanks for reporting. I haven't taken a deep look at this yet, but I suspect the problem has to do with our vscode-codeql/extensions/ql-vscode/src/interface-utils.ts Lines 158 to 194 in 1d414ba
Just marking this now so that whoever looks at this later will know where to start. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
VSCode only handles locations corresponding to a range. This is a known shortcoming. This also means special ranges can correspond to invalid VSCode ranges which mean that no scroll happens. This likely has never worked 100% but we did fix some off by one errors which may have caused it to seem to work.
Version
Extension v1.5.5
CodeQL CLI v2.6.2
VSCode:
To reproduce

Consider the following screenshot, with a query that emits location links to a file in the database. Only a small number of these locations actually work (in the sense that they can be clicked and VSCode selects the given location).
As is visible in the output (Problem View), most of the locations are mapped to the top of the file. According to our documentation, however,
:2:0:2:0
, for example, should mark the entire second line.This is a somewhat serious problem, because it prevents results from being properly accessible. We recently encountered issues with our Java JSP support, where the resulting locations in the JSP files all pointed at the top of the files, making triaging the results very tedious.
Expected behavior
Location display in VSCode should be consistent with our documentation.
Additional context
Here the query that was used in the screenshot above:
@alexet
The text was updated successfully, but these errors were encountered: