{"meta":{"title":"resolve files","intro":"[Deep plumbing] Expand a set of file inclusion/exclusion globs.","product":"Security and code quality","breadcrumbs":[{"href":"/en/code-security","title":"Security and code quality"},{"href":"/en/code-security/reference","title":"Reference"},{"href":"/en/code-security/reference/code-scanning","title":"Code scanning"},{"href":"/en/code-security/reference/code-scanning/codeql","title":"CodeQL"},{"href":"/en/code-security/reference/code-scanning/codeql/codeql-cli-manual","title":"CodeQL CLI manual"},{"href":"/en/code-security/reference/code-scanning/codeql/codeql-cli-manual/resolve-files","title":"resolve files"}],"documentType":"article"},"body":"# resolve files\n\n[Deep plumbing] Expand a set of file inclusion/exclusion globs.\n\n> [!NOTE]\n> This content describes the most recent release of the CodeQL CLI. For more information about this release, see https://github.com/github/codeql-cli-binaries/releases.\n>\n> To see details of the options available for this command in an earlier release, run the command with the <span style=\"white-space: nowrap;\">`--help`</span> option in your terminal.\n\n## Synopsis\n\n```shell copy\ncodeql resolve files <options>... -- <dir>\n```\n\n## Description\n\n\\[Deep plumbing] Expand a set of file inclusion/exclusion globs.\n\nThis plumbing command is responsible for expanding the command-line\nparameters of subcommands that operate on multiple files, identified by\ntheir paths. By default, all files are included, and so running this\ncommand without any filter arguments will collect all files in a\ndirectory.\n\nThe `--include`, `--exclude`, and `--prune` options all take glob\npatterns, which can use the following wildcard characters:\n\n* A single \"?\" matches any character other than a forward/backward\n  slash;\n* A single \"\\*\" matches any number of characters other than a\n  forward/backward slash;\n* The pattern \"\\*\\*\" matches zero or more complete directory\n  components.\n\n## Options\n\n### Primary Options\n\n#### `<dir>`\n\nThe directory to be searched.\n\n#### `--format=<fmt>`\n\nSelect output format, either `text` _(default)_ or `json`.\n\n### Options for limiting the set of collected files\n\n#### `--include-extension=<.ext>`\n\nInclude all files in the search directory tree that have the given\nextension. Typically, you should include the dot before the extension.\nFor example, passing `--include-extension .xml` will include all files\nwith the \".xml\" extension. This option is incompatible with negated\n`--include` options.\n\n#### `--include=<glob>`\n\nInclude all files and directories in the search directory tree that\nmatch the given glob, using each file and directory's relative path\nfrom the search directory. If the glob begins with a `!` character, the\nmatching files and directories would instead be excluded.\n\n`--include` options are processed in order, with later options\noverriding earlier ones. For example,\n`--include ** --include !sub/*.ts --include sub/main.*` would include\n`sub/main.ts` (because it is included by `sub/main.*`), exclude\n`sub/index.ts` (because it is excluded by `!sub/*.ts`), and include\n`sub/test.js` (because it is included by `**` without being subsequently\nexcluded.)\n\n#### `--also-match=<glob>`\n\nRequire all results to also match the given glob, using each file and\ndirectory's relative path from the search directory. This option has\nthe same structure and the same interpretation as `--include` but\nspecifies a separate sequence of globs that are applied in conjunction\nwith `--include`.\n\n#### `--exclude=<glob>`\n\nExclude all files and directories that match the given glob, using each\nfile and directory's relative path from the search directory. This\noption overrides all include options. This option is incompatible with\nnegated `--include` options.\n\n#### `--prune=<glob>`\n\nExclude all files and directories that match the given glob, using each\nfile and directory's relative path from the search directory. This\noption overrides all include options. This option is incompatible with\nnegated `--include` options.\n\n#### `--size-limit=<bytes>`\n\nExclude all files whose size exceeds the given limit. The size limit is\nin bytes, or in kibibytes (KiB) with the \"k\" suffix, in mebibytes\n(MiB) with the \"m\" suffix, and in gibibytes (GiB) with the \"g\"\nsuffix. This option overrides all include options.\n\n#### `--total-size-limit=<bytes>`\n\nMake the command exit with an error if the combined size of all resolved\nfiles would exceed the given limit. The size limit is in bytes, or in\nkibibytes (KiB) with the \"k\" suffix, in mebibytes (MiB) with the \"m\"\nsuffix, and in gibibytes (GiB) with the \"g\" suffix.\n\n#### `--[no-]follow-symlinks`\n\nFollow any symbolic links to their targets.\n\n#### `--[no-]find-any`\n\nFind at most one match (as opposed to all matches).\n\nAvailable since `v2.11.3`.\n\n### Common options\n\n#### `-h, --help`\n\nShow this help text.\n\n#### `-J=<opt>`\n\n\\[Advanced] Give option to the JVM running the command.\n\n(Beware that options containing spaces will not be handled correctly.)\n\n#### `-v, --verbose`\n\nIncrementally increase the number of progress messages printed.\n\n#### `-q, --quiet`\n\nIncrementally decrease the number of progress messages printed.\n\n#### `--verbosity=<level>`\n\n\\[Advanced] Explicitly set the verbosity level to one of errors,\nwarnings, progress, progress+, progress++, progress+++. Overrides `-v`\nand `-q`.\n\n#### `--logdir=<dir>`\n\n\\[Advanced] Write detailed logs to one or more files in the given\ndirectory, with generated names that include timestamps and the name of\nthe running subcommand.\n\n(To write a log file with a name you have full control over, instead\ngive `--log-to-stderr` and redirect stderr as desired.)\n\n#### `--common-caches=<dir>`\n\n\\[Advanced] Controls the location of cached data on disk that will\npersist between several runs of the CLI, such as downloaded QL packs and\ncompiled query plans. If not set explicitly, this defaults to a\ndirectory named `.codeql` in the user's home directory; it will be\ncreated if it doesn't already exist.\n\nAvailable since `v2.15.2`."}