Co-authored-by: Sarita Iyer <66540150+saritai@users.noreply.github.com> Co-authored-by: Felicity Chapman <felicitymay@github.com> Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com> Co-authored-by: Sam Browning <106113886+sabrowning1@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com> Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com>
4.6 KiB
title, shortTitle, versions, topics, type, intro
| title | shortTitle | versions | topics | type | intro | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| About CodeQL for VS Code | About the extension |
|
|
reference | You can write, run, and test {% data variables.product.prodname_codeql %} queries inside {% data variables.product.prodname_vscode %} with the {% data variables.product.prodname_codeql %} extension. |
About {% data variables.product.prodname_codeql %} for {% data variables.product.prodname_vscode %}
You can run {% data variables.product.prodname_codeql %} queries on databases generated from source code, in order to find errors and security vulnerabilities in a codebase. For more information about {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %}, see "AUTOTITLE."
With the {% data variables.product.prodname_codeql %} for {% data variables.product.prodname_vscode %} extension, you can:
- Write custom {% data variables.product.prodname_codeql %} queries and supporting libraries.
- Directly view and use the {% data variables.product.prodname_codeql %} security queries from the large, open-source
github/codeqlrepository. - Run queries over one or more {% data variables.product.prodname_codeql %} databases.
- Track the flow of data through a program, highlighting areas that are potential security vulnerabilities.
- View, create, and edit all types of {% data variables.product.prodname_codeql %} packs of queries or libraries that you can use or publish to share with others.
- Run unit tests for {% data variables.product.prodname_codeql %} queries.
- Use a dedicated editor for viewing, creating, and editing {% data variables.product.prodname_codeql %} model packs, which are used to extend standard {% data variables.product.prodname_codeql %} analysis.
The {% data variables.product.prodname_codeql %} for {% data variables.product.prodname_vscode %} extension also adds a {% data variables.product.prodname_codeql %} sidebar view to {% data variables.product.prodname_vscode_shortname %}. This contains a list of local {% data variables.product.prodname_codeql %} databases, an overview of the queries that you have run in the current session, and a variant analysis view for large-scale analysis.
IntelliSense
The extension provides standard IntelliSense features for query files (extension .ql) and library files (extension .qll) that you open in the {% data variables.product.prodname_vscode_shortname %} editor. These include:
- Syntax highlighting
- Right-click options (such as Go To Definition)
- Autocomplete suggestions
- Hover information
For more information about Intellisense in {% data variables.product.prodname_vscode_shortname %}, see IntelliSense in the {% data variables.product.prodname_vscode %} documentation.
You can also use the {% data variables.product.prodname_vscode_shortname %} Format Document command to format your code according to the {% data variables.product.prodname_codeql %} style guide.
The {% data variables.product.prodname_vscode_command_palette_shortname %}
You can run commands for the {% data variables.product.prodname_codeql %} for {% data variables.product.prodname_vscode %} extension from the {% data variables.product.prodname_vscode_command_palette_shortname %}. For more information about the {% data variables.product.prodname_vscode_command_palette_shortname %}, see "User Interface" in the {% data variables.product.prodname_vscode_shortname %} documentation.
Data and telemetry
If you specifically opt in to permit {% data variables.product.prodname_dotcom %} to do so, {% data variables.product.prodname_dotcom %} will collect usage data and metrics for the purposes of helping the core developers to improve the {% data variables.product.prodname_codeql %} for {% data variables.product.prodname_vscode %} extension. For more information, see "AUTOTITLE."
{% data reusables.code-scanning.codeql-license %}
Next steps
To learn about how to install the {% data variables.product.prodname_codeql %} for {% data variables.product.prodname_vscode %} extension, see "AUTOTITLE."