Add queries for VS Code jump-to-definition#3308
Conversation
| * for jump-to-definition in the code viewer. | ||
| * @kind definitions | ||
| * @id cpp/jump-to-definition | ||
| * @tags local-definitions |
There was a problem hiding this comment.
How about:
@tags ide-contextual-queries/local-definitions
d9729c2 to
6a59ce3
Compare
|
Possible arguments for "why use |
Those are good arguments, so let's focus on the possibility of using |
|
The reason is that |
|
Note that classify files does require different processing so it does need a new kind. |
Yes, and that can be done without changing LGTM since we'll just tweak the scripts to produce a suite with exactly one Thanks for clarifying. I have no further objections to classifying by tag. |
|
We do need to tweak the current codeql suites though. |
|
Is the above commit sufficient for 'tweak the current codeql suites'? |
|
Perhaps the |
6f13e30 to
d49e936
Compare
|
Does the script for generating the LGTM query suites need to be updated as well? |
| external string selectedSourceFile(); | ||
|
|
||
| cached | ||
| File getEncodedFile(string name) { result.getAbsolutePath().replaceAll(":", "_") = name } |
Good question; I'm trying to find a but when I run which lacks the Any idea where that script is invoked with |
|
I think EDIT: No, I lie. Try |
e20dd5d to
b82db2f
Compare
Ok, both of those generated a commandline with |
|
In any event, raised https://git.semmle.com/Semmle/code/pull/36810 to exclude queries by tag. |
b82db2f to
e73833e
Compare
The legacy languages specify parts of their LGTM suites manually. For Go everything is auto-generated. |
|
Since this can have performance implications for the LGTM suite, I’d like to wait until the CPP-Differences jobs for #3400 have finished and then run CPP-differences for this PR too. I assume it’s not urgent to merge this since it’s targeted at master, and the |
|
I've started https://jenkins.internal.semmle.com/job/Changes/job/CPP-Differences/1107/ to test this PR for performance. |
jbj
left a comment
There was a problem hiding this comment.
Performance LGTM. There's a noticeable slowdown on Wireshark, but that affects other queries too, so I think it's just noise.
The tags on these queries are a tentative proposal for how to signal to the vscode extension that they are the right template queries to run for jump-to-definition and find-references. I am very open to anything from bikeshedding their exact names, to arguments for using other mechanisms instead of tags.