The viewer is largely implemented now with the following features and limitations: 1. Any query with `@kind graph` will be opened as a graph 2. Queries that are `@kind graph` and `@tags ide-contextual-queries/print-cfg` will be used in the `CodeQL: View CFG` context command. This will be visible similar to how the AST viewer works. If there is not exactly 1 such query for a given language, then the extension will throw an error. 3. Unfortunately, the cg viewer assumes that the entire file will be added to the graph, so often this will be too big, That leads to the following limitation: 4. There is no size checking on the graph. Graphs that are too big will crash vscode. 5. Lastly, there is a small bug in how the `@id` is interpreted. Any `@id` with a `/` in it will place the `.dot` in a location that can't be found by vscode. So, just don't name your queries with any `/`. This feature is only available in canary mode.
CodeQL for Visual Studio Code
This project is an extension for Visual Studio Code that adds rich language support for CodeQL. It's used to find problems in code bases using CodeQL. It's written primarily in TypeScript.
The extension is released. You can download it from the Visual Studio Marketplace.
To see what has changed in the last few versions of the extension, see the Changelog.
Features
- Enables you to use CodeQL to query databases and discover problems in codebases.
- Shows the flow of data through the results of path queries, which is essential for triaging security results.
- Provides an easy way to run queries from the large, open source repository of CodeQL security queries.
- Adds IntelliSense to support you writing and editing your own CodeQL query and library files.
Project goals and scope
This project will track new feature development in CodeQL and, whenever appropriate, bring that functionality to the Visual Studio Code experience.
Contributing
This project welcomes contributions. See CONTRIBUTING.md for details on how to build, install, and contribute.
License
The CodeQL extension for Visual Studio Code is licensed under the MIT License. The version of CodeQL used by the CodeQL extension is subject to the CodeQL Research Terms & Conditions.
When using the GitHub logos, be sure to follow the GitHub logo guidelines.