Highlight/color query results in code

Open
#1,775 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript, vscode

Research direction

The issue names no files or tests. Start by locating the code that handles CodeQL query-result references and navigation to source locations in the VS Code extension. Define whether completion means coloring whole lines or only references, then verify that both locations from the example are highlighted and remain clickable.

Written by the indexing model from the issue text.

Description

enhancement VSCode

Is your feature request related to a problem? Please describe.
There is no present problem, it's just a feature request.
I would like to have the query results highlighted/colored in the code.

Describe the solution you'd like
In more detail, consider the query

from FunctionCall call
select call

which returns a query result with all the references to function calls
in the database, that you can click on and they will be shown in the source code.
What I would like to see is these locations in the code colored.

Describe alternatives you've considered
Either have the whole line colored or only the references.

Additional context
Example:

int func()
{
    int a = 0;
    
    foo();    /* this expression or the whole line would be colored */
    a++;
    bar();   /* this expression or the whole line would be colored */
    return a;
}
`
Dominant language
TypeScript
Stars
539
Forks
240
Avg merge
2d 6h
Merged PRs (30d)
29

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/vscode-codeql

All issues in github/vscode-codeql

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.