@@ -119,7 +119,7 @@ typically a query metadata property. The value can be:
119
119
To match a constraint, a metadata value must match one of the strings or
120
120
regular expressions. When there is more than one metadata key, each key must be matched.
121
121
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 ``.
123
123
For more information about query metadata properties, see
124
124
":ref: `Metadata for CodeQL queries <metadata-for-codeql-queries >`."
125
125
@@ -133,14 +133,16 @@ In addition to metadata tags, the keys in the constraint block can also be:
133
133
- ``tags contain all ``---each of the given match strings must match one of the
134
134
components of the ``@tags `` metadata property.
135
135
136
- Filtering Examples
137
- ~~~~~~~~~~~~~~~~~~
136
+ Examples of filtering which queries are run
137
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
138
138
139
139
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 ``:
142
144
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 ``::
144
146
145
147
- qlpack: codeql/cpp-queries
146
148
- exclude:
@@ -180,8 +182,9 @@ and ``@precision high`` from the ``my-custom-queries`` directory, use::
180
182
kind: problem
181
183
precision: very-high
182
184
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 ``::
185
188
186
189
- queries: my-custom-queries
187
190
- include:
@@ -216,7 +219,9 @@ use::
216
219
Tip
217
220
218
221
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.
220
225
221
226
Reusing existing query suite definitions
222
227
-----------------------------------------
@@ -292,7 +297,7 @@ instruction::
292
297
from: my-org/my-custom-instructions
293
298
version: ^1.2.3 # optional
294
299
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
296
301
query suite. For example, this suite will further filter the ``cpp-security-and-quality `` suite
297
302
and exclude ``low `` and ``medium `` precision queries::
298
303
0 commit comments