Skip to content

Commit 4124418

Browse files
Apply suggestions from code review
Co-authored-by: Felicity Chapman <felicitymay@github.com>
1 parent 0f8ffb1 commit 4124418

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

docs/codeql/codeql-cli/analyzing-databases-with-the-codeql-cli.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,28 +138,29 @@ For further information about default suites, see ":ref:`Publishing and using Co
138138
Running a subset of queries in a CodeQL pack
139139
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
140140

141-
Additionally, CodeQL CLI v2.8.1 or later, you can include a path at the end of a pack specification to run a subset of queries inside the pack. This applies to any command that locates or runs queries within a pack.
141+
If you are using CodeQL CLI v2.8.1 or later, you can include a path at the end of a pack specification to run a subset of queries inside the pack. This applies to any command that locates or runs queries within a pack.
142142

143143
The complete way to specify a set of queries is in the form ``scope/name@range:path``, where:
144144

145145
- ``scope/name`` is the qualified name of a CodeQL pack.
146146
- ``range`` is a `semver range <https://docs.npmjs.com/cli/v6/using-npm/semver#ranges>`_.
147147
- ``path`` is a file system path to a single query, a directory containing queries, or a query suite file.
148148

149-
If a ``scope/name`` is specified, the ``range`` and ``path`` are
150-
optional. A missing ``range`` implies the latest version of the
151-
specified pack. A missing ``path`` implies the default query suite
152-
of the specified pack.
149+
When you specify a ``scope/name``, the ``range`` and ``path`` are
150+
optional. If you omit a ``range`` then the latest version of the
151+
specified pack is used. If you omit a ``path`` then the default query suite
152+
of the specified pack is used.
153153

154154
The ``path`` can be one of a ``*.ql`` query file, a directory
155155
containing one or more queries, or a ``.qls`` query suite file. If
156-
there is no pack name specified, then a ``path`` must be provided,
157-
and will be interpreted relative to the current working directory
156+
you omit a pack name, then you must provide a ``path``,
157+
which will be interpreted relative to the working directory
158158
of the current process.
159159

160-
If a ``scope/name`` and ``path`` are specified, then the ``path`` cannot
160+
If you specify a ``scope/name`` and ``path``, then the ``path`` cannot
161161
be absolute. It is considered relative to the root of the CodeQL
162162
pack.
163+
163164
To analyze a database using all queries in the `experimental/Security` folder within the `codeql/cpp-queries` CodeQL pack you can use::
164165

165166
codeql database analyze --format=sarif-latest --output=results <db> \

0 commit comments

Comments
 (0)