Skip to content

Commit 9d6b1bf

Browse files
aeisenbergjf205
andauthored
Apply suggestions from code review
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com>
1 parent b993558 commit 9d6b1bf

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

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

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -161,34 +161,22 @@ If a ``scope/name`` and ``path`` are specified, then the ``path`` cannot
161161
be absolute. It is considered relative to the root of the CodeQL
162162
pack.
163163

164-
The relevant commands are:
165-
166-
* `codeql database analyze <../manual/database-analyze>`__.
167-
* `codeql database run-queries <../manual/database-run-queries>`__.
168-
* `codeql execute queries <../manual/execute-queries>`__.
169-
* `codeql resolve queries <../manual/resolve-queries>`__.
170-
171164
For example::
172165

173-
# Analyze a database using all queries in the experimental/Security folder within the codeql/cpp-queries
174-
# CodeQL query pack.
166+
To analyze a database using all queries in the `experimental/Security` folder within the `codeql/cpp-queries` CodeQL pack you can use::
167+
175168
codeql database analyze --format=sarif-latest --output=results <db> \
176169
codeql/cpp-queries:experimental/Security
177170

178-
# Analyse using only the RedundantNullCheckParam.ql query in the codeql/cpp-queries CodeQL query pack.
171+
To run the `RedundantNullCheckParam.ql` query in the `codeql/cpp-queries` CodeQL pack use::
172+
179173
codeql database analyze --format=sarif-latest --output=results <db> \
180174
'codeql/cpp-queries:experimental/Likely Bugs/RedundantNullCheckParam.ql'
181175

182-
# Analyse using the cpp-security-and-quality.qls query suite in the codeql/cpp-queries CodeQL query pack.
183-
codeql database analyze --format=sarif-latest --output=results <db> \
184-
'codeql/cpp-queries:codeql-suites/cpp-security-and-quality.qls'
176+
To analyze your database using the `cpp-security-and-quality.qls` query suite from a version of the `codeql/cpp-queries` CodeQL pack that is >= 0.0.3 and < 0.1.0 (the highest compatible version will be chosen) you can use::
185177

186-
# Analyse using the cpp-security-and-quality.qls query suite from a version of the codeql/cpp-queries pack
187-
# that is >= 0.0.3 and < 0.1.0 (the highest compatible version will be chosen).
188-
# All valid semver ranges are allowed. See https://docs.npmjs.com/cli/v6/using-npm/semver#ranges
189178
codeql database analyze --format=sarif-latest --output=results <db> \
190179
'codeql/cpp-queries@~0.0.3:codeql-suites/cpp-security-and-quality.qls'
191-
192180
For more information about CodeQL packs, see :doc:`About CodeQL Packs <about-codeql-packs>`.
193181

194182
Running query suites

0 commit comments

Comments
 (0)