Skip to content

Commit 68f0505

Browse files
committed
Apply suggestions from code review
1 parent a9202b5 commit 68f0505

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

docs/codeql/codeql-cli/creating-codeql-query-suites.rst

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ typically a query metadata property. The value can be:
119119
To match a constraint, a metadata value must match one of the strings or
120120
regular expressions. When there is more than one metadata key, each key must be matched.
121121
The standard metadata keys available to match on are: ``description``, ``id``, ``kind``,
122-
``name``, ``tags``, ``precision``, ``problem.severity``, and ``security-severity``.
122+
``name``, ``tags``, ``precision``, and ``problem.severity``.
123123
For more information about query metadata properties, see
124124
":ref:`Metadata for CodeQL queries <metadata-for-codeql-queries>`."
125125

@@ -133,14 +133,16 @@ In addition to metadata tags, the keys in the constraint block can also be:
133133
- ``tags contain all``---each of the given match strings must match one of the
134134
components of the ``@tags`` metadata property.
135135

136-
Filtering Examples
137-
~~~~~~~~~~~~~~~~~~
136+
Examples of filtering which queries are run
137+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
138138

139139
A common use case is to create a query suite that runs all queries in a CodeQL pack,
140-
except for a few that are known to be problematic. The following three query suite
141-
definitions are semantically identical:
140+
except for a few specific queries that the user does not want to run. In general, we
141+
recommend filtering on the query ``id``, which is a unique and stable identifier for
142+
each query. The following three query suite definitions are semantically identical and
143+
filter by the query ``id``:
142144

143-
Matches all queries in ``codeql/cpp-queries``, except for the two queries with either given ``id``::
145+
Matches all queries in the default suite of ``codeql/cpp-queries``, except for the two queries with either given ``id``::
144146

145147
- qlpack: codeql/cpp-queries
146148
- exclude:
@@ -180,8 +182,9 @@ and ``@precision high`` from the ``my-custom-queries`` directory, use::
180182
kind: problem
181183
precision: very-high
182184

183-
Note that the following query suite definition is not equivalent. This definition will select
184-
queries that are ``@kind problem`` *or* are ``@precision very-high``::
185+
Note that the following query suite definition is not equivalent to the above
186+
definition. This definition will select queries that are ``@kind problem`` *or*
187+
are ``@precision very-high``::
185188

186189
- queries: my-custom-queries
187190
- include:
@@ -216,7 +219,9 @@ use::
216219
Tip
217220

218221
You can use the ``codeql resolve queries /path/to/suite.qls`` command to see
219-
which queries are selected by a query suite definition.
222+
which queries are selected by a query suite definition. For more information,
223+
see the `resolve queries <../../codeql-cli/manual/resolve-queries>`__
224+
reference documentation.
220225

221226
Reusing existing query suite definitions
222227
-----------------------------------------
@@ -292,7 +297,7 @@ instruction::
292297
from: my-org/my-custom-instructions
293298
version: ^1.2.3 # optional
294299

295-
A common use case an ``import`` instruction is to apply a further filter to queries from another
300+
A common use case for an ``import`` instruction is to apply a further filter to queries from another
296301
query suite. For example, this suite will further filter the ``cpp-security-and-quality`` suite
297302
and exclude ``low`` and ``medium`` precision queries::
298303

0 commit comments

Comments
 (0)