mirror of
https://github.com/github/codeql.git
synced 2026-04-23 15:55:18 +02:00
Apply feedback and fix syntax
This commit is contained in:
@@ -61,13 +61,14 @@ Creating a custom query
|
||||
|
||||
You can generate a query template for a specific language from the queries panel, then write your own code to quickly create a custom query.
|
||||
|
||||
#. Optionally, to create a custom query in an existing directory, in the sidebar, click the **Queries** title bar to expand the queries panel, then select the desired directory.
|
||||
#. In the sidebar, hover over the **Queries** title bar, then click the **Create query** icon.
|
||||
|
||||
.. image:: ../images/codeql-for-visual-studio-code/create-query-icon.png
|
||||
:width: 350
|
||||
:alt: Screenshot of the queries panel. The "Create query" icon is outlined in dark orange.
|
||||
|
||||
#. In the Command Palette, select the target language for your query. Selecting a language will autogenerate a directory labeled `codeql-custom-queries-<language>`, where `<language>` is the name of the selected language. That directory will contain a query template labeled `example.ql`.
|
||||
#. In the Command Palette, select the target language for your query. If you've chosen not to create your custom query in an existing directory, selecting a language will autogenerate a directory labeled ``codeql-custom-queries-<language>``, where ``<language>`` is the name of the selected language. A query template labeled ``example.ql`` will then be added to the existing or autogenerated directory.
|
||||
#. In the template, write your custom query, then save the file. Once your query is finished, you can run it from the queries panel.
|
||||
|
||||
Running a query
|
||||
|
||||
Reference in New Issue
Block a user