Skip to content

Commit f31a7cf

Browse files
nickrolfejf205
andauthored
Apply suggestions from code review
Co-authored-by: James Fletcher <[email protected]>
1 parent d893768 commit f31a7cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/codeql/writing-codeql-queries/defining-the-results-of-a-query.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ About query results
1010

1111
The information contained in the results of a query is controlled by the ``select`` statement. Part of the process of developing a useful query is to make the results clear and easy for other users to understand.
1212
When you write your own queries in the query console or in the CodeQL :ref:`extension for VS Code <codeql-for-visual-studio-code>` there are no constraints on what can be selected.
13-
However, if you want to use a query to create alerts for Code Scanning or generate valid analysis results using the :ref:`CodeQL CLI <codeql-cli>`, you'll need to make the ``select`` statement report results in the required format.
13+
However, if you want to use a query to create alerts for code scanning or generate valid analysis results using the :ref:`CodeQL CLI <codeql-cli>`, you'll need to make the ``select`` statement report results in the required format.
1414
You must also ensure that the query has the appropriate metadata properties defined.
1515
This topic explains how to write your select statement to generate helpful analysis results.
1616

@@ -63,7 +63,7 @@ This basic select statement has two columns:
6363
Including the name of the superclass
6464
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6565

66-
The alert message defined by the basic select statement is constant and doesn't give users much information. Since the query identifies the superclas, it's easy to include its name in the string message. For example:
66+
The alert message defined by the basic select statement is constant and doesn't give users much information. Since the query identifies the superclass, it's easy to include its name in the string message. For example:
6767

6868
.. code-block:: ql
6969
@@ -81,7 +81,7 @@ While this is more informative than the original select statement, the user stil
8181
Adding a link to the superclass
8282
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8383

84-
You can use placeholders in the text of alert messages to insert additional information, such as links to the similar file. Placeholders are defined using ``$@``, and filled using the information in the next two columns of the select statement. For example, this select statement returns four columns:
84+
You can use placeholders in the text of alert messages to insert additional information, such as links to the superclass. Placeholders are defined using ``$@``, and filled using the information in the next two columns of the select statement. For example, this select statement returns four columns:
8585

8686
.. code-block:: ql
8787
@@ -92,7 +92,7 @@ You can use placeholders in the text of alert messages to insert additional info
9292
#. Element for placeholder: the ``superclass``.
9393
#. String text for placeholder: the class name returned by ``superclass.getBaseName()``.
9494

95-
When the alert message is displayed, the ``$@`` placeholder is replaced by a link created from the contents of the third and fourth columns defined by the ``select`` statement. In this example, the link target will be the location of the superclass's definition, and the link text will be its name. Note that some superclasses, such as `Object``, will not be in the database, since they are built in to the Java language. Clicking those links will have no effect.
95+
When the alert message is displayed, the ``$@`` placeholder is replaced by a link created from the contents of the third and fourth columns defined by the ``select`` statement. In this example, the link target will be the location of the superclass's definition, and the link text will be its name. Note that some superclasses, such as ``Object``, will not be in the database, since they are built in to the Java language. Clicking those links will have no effect.
9696

9797
If you use the ``$@`` placeholder marker multiple times in the description text, then the ``N``\ th use is replaced by a link formed from columns ``2N+2`` and ``2N+3``. If there are more pairs of additional columns than there are placeholder markers, then the trailing columns are ignored. Conversely, if there are fewer pairs of additional columns than there are placeholder markers, then the trailing markers are treated as normal text rather than placeholder markers.
9898

0 commit comments

Comments
 (0)