Skip to content

Commit c52b1b1

Browse files
docs-botmchammer01
andauthored
Update CodeQL CLI manual (#57358)
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
1 parent 23ce3b3 commit c52b1b1

File tree

4 files changed

+114
-1
lines changed

4 files changed

+114
-1
lines changed
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
title: generate overlay-changes
3+
intro: |
4+
[Plumbing] Generate a file that can be used for the
5+
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
6+
fpt: '*'
7+
ghec: '*'
8+
ghes: '*'
9+
topics:
10+
- Code Security
11+
- Code scanning
12+
- CodeQL
13+
type: reference
14+
product: '{% data reusables.gated-features.codeql %}'
15+
autogenerated: codeql-cli
16+
---
17+
18+
<!-- Content after this section is automatically generated -->
19+
20+
{% data reusables.codeql-cli.man-pages-version-note %}
21+
22+
## Synopsis
23+
24+
```shell copy
25+
codeql generate overlay-changes [--source-root=<dir>] [--output=<file>] <options>... -- <database>
26+
```
27+
28+
## Description
29+
30+
\[Plumbing] Generate a file that can be used for the
31+
`--overlay-changes` option to
32+
[codeql database create](/code-security/codeql-cli/codeql-cli-manual/database-create) when extracting an overlay database.
33+
34+
This command is intended to be used mostly for manual or automated
35+
testing. It is not particularly efficient. For production use, consider
36+
if the changes file can instead be derived from something like
37+
`git diff --name-only`.
38+
39+
## Options
40+
41+
### Primary Options
42+
43+
#### `<database>`
44+
45+
\[Mandatory] Path to the _base_ database into which the overlay will be
46+
extracted.
47+
48+
#### `-s, --source-root=<dir>`
49+
50+
The directory containing the source code to be extracted as an overlay.
51+
If not given, the current working directory is used.
52+
53+
#### `-o, --output=<file>`
54+
55+
The changes file will be written to this location. If it is not
56+
specified, the changes will be written to standard output.
57+
58+
### Common options
59+
60+
#### `-h, --help`
61+
62+
Show this help text.
63+
64+
#### `-J=<opt>`
65+
66+
\[Advanced] Give option to the JVM running the command.
67+
68+
(Beware that options containing spaces will not be handled correctly.)
69+
70+
#### `-v, --verbose`
71+
72+
Incrementally increase the number of progress messages printed.
73+
74+
#### `-q, --quiet`
75+
76+
Incrementally decrease the number of progress messages printed.
77+
78+
#### `--verbosity=<level>`
79+
80+
\[Advanced] Explicitly set the verbosity level to one of errors,
81+
warnings, progress, progress+, progress++, progress+++. Overrides `-v`
82+
and `-q`.
83+
84+
#### `--logdir=<dir>`
85+
86+
\[Advanced] Write detailed logs to one or more files in the given
87+
directory, with generated names that include timestamps and the name of
88+
the running subcommand.
89+
90+
(To write a log file with a name you have full control over, instead
91+
give `--log-to-stderr` and redirect stderr as desired.)
92+
93+
#### `--common-caches=<dir>`
94+
95+
\[Advanced] Controls the location of cached data on disk that will
96+
persist between several runs of the CLI, such as downloaded QL packs and
97+
compiled query plans. If not set explicitly, this defaults to a
98+
directory named `.codeql` in the user's home directory; it will be
99+
created if it doesn't already exist.
100+
101+
Available since `v2.15.2`.

content/code-security/codeql-cli/codeql-cli-manual/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ children:
5555
- /execute-upgrades
5656
- /generate-extensible-predicate-metadata
5757
- /generate-log-summary
58+
- /generate-overlay-changes
5859
- /generate-query-help
5960
- /github-merge-results
6061
- /github-upload-results

content/code-security/codeql-cli/codeql-cli-manual/resolve-languages.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ per-user configuration file).
6161

6262
(Note: On Windows the path separator is `;`).
6363

64+
#### `--[no-]filter-to-languages-with-queries`
65+
66+
List only languages that have default queries.
67+
68+
Available since `v2.23.0`.
69+
6470
#### `--format=<fmt>`
6571

6672
Select output format. Choices include:

content/code-security/codeql-cli/codeql-cli-manual/test-extract.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ redirect_from:
2727
## Synopsis
2828

2929
```shell copy
30-
codeql test extract [--source-root=<dir>] <options>... -- <testDirectory>
30+
codeql test extract [--print-database] [--source-root=<dir>] <options>... -- <testDirectory>
3131
```
3232

3333
## Description
@@ -52,6 +52,11 @@ Override the location of the database being created. By default it will
5252
be a subdirectory whose name is derived from the name of the test
5353
directory itself with '.testproj' appended.
5454

55+
#### `-D, --print-database`
56+
57+
Print the path to the database being created, rather than the dataset
58+
inside it.
59+
5560
#### `-s, --source-root=<dir>`
5661

5762
\[Advanced] The root source code directory, if different from the test

0 commit comments

Comments
 (0)