title | versions | topics | type | product | autogenerated | intro | redirect_from | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
resolve files |
|
|
reference |
{% data reusables.gated-features.codeql %} |
codeql-cli |
[Deep plumbing] Expand a set of file inclusion/exclusion globs. |
|
{% data reusables.codeql-cli.man-pages-version-note %}
codeql resolve files <options>... -- <dir>
[Deep plumbing] Expand a set of file inclusion/exclusion globs.
This plumbing command is responsible for expanding the command-line parameters of subcommands that operate on multiple files, identified by their paths. By default, all files are included, and so running this command without any filter arguments will collect all files in a directory.
The --include
, --exclude
, and --prune
options all take glob
patterns, which can use the following wildcard characters:
- A single "?" matches any character other than a forward/backward slash;
- A single "*" matches any number of characters other than a forward/backward slash;
- The pattern "**" matches zero or more complete directory components.
The directory to be searched.
Select output format, either text
(default) or json
.
Include all files in the search directory tree that have the given
extension. Typically, you should include the dot before the extension.
For example, passing --include-extension .xml
will include all files
with the ".xml" extension. This option is incompatible with negated
--include
options.
Include all files and directories in the search directory tree that
match the given glob, using each file and directory's relative path
from the search directory. If the glob begins with a !
character, the
matching files and directories would instead be excluded.
--include
options are processed in order, with later options
overriding earlier ones. For example,
--include ** --include !sub/*.ts --include sub/main.*
would include
sub/main.ts
(because it is included by sub/main.*
), exclude
sub/index.ts
(because it is excluded by !sub/*.ts
), and include
sub/test.js
(because it is included by **
without being subsequently
excluded.)
Require all results to also match the given glob, using each file and
directory's relative path from the search directory. This option has
the same structure and the same interpretation as --include
but
specifies a separate sequence of globs that are applied in conjunction
with --include
.
Exclude all files and directories that match the given glob, using each
file and directory's relative path from the search directory. This
option overrides all include options. This option is incompatible with
negated --include
options.
Exclude all files and directories that match the given glob, using each
file and directory's relative path from the search directory. This
option overrides all include options. This option is incompatible with
negated --include
options.
Exclude all files whose size exceeds the given limit. The size limit is in bytes, or in kibibytes (KiB) with the "k" suffix, in mebibytes (MiB) with the "m" suffix, and in gibibytes (GiB) with the "g" suffix. This option overrides all include options.
Make the command exit with an error if the combined size of all resolved files would exceed the given limit. The size limit is in bytes, or in kibibytes (KiB) with the "k" suffix, in mebibytes (MiB) with the "m" suffix, and in gibibytes (GiB) with the "g" suffix.
Follow any symbolic links to their targets.
Find at most one match (as opposed to all matches).
Available since v2.11.3
.
Show this help text.
[Advanced] Give option to the JVM running the command.
(Beware that options containing spaces will not be handled correctly.)
Incrementally increase the number of progress messages printed.
Incrementally decrease the number of progress messages printed.
[Advanced] Explicitly set the verbosity level to one of errors,
warnings, progress, progress+, progress++, progress+++. Overrides -v
and -q
.
[Advanced] Write detailed logs to one or more files in the given directory, with generated names that include timestamps and the name of the running subcommand.
(To write a log file with a name you have full control over, instead
give --log-to-stderr
and redirect stderr as desired.)
[Advanced] Controls the location of cached data on disk that will
persist between several runs of the CLI, such as downloaded QL packs and
compiled query plans. If not set explicitly, this defaults to a
directory named .codeql
in the user's home directory; it will be
created if it doesn't already exist.
Available since v2.15.2
.