| description | Reference for the codeql resolve queries command |
|---|
The codeql resolve queries command is used to resolve the file paths of CodeQL queries on the local system. Query paths can be resolved for any existing (or installed):
- directory
- query
- suite
- pack
The following is an example use of the codeql resolve queries command when targeting a directory:
codeql resolve queries --format=bylanguage -- languages/Which will produce output similar to the following:
{
"byLanguage": {
"cpp": {
"/example-path-to/git-base/codeql-development-template/languages/cpp/tools/src/PrintAST/PrintAST.ql": {}
}
},
"noDeclaredLanguage": {},
"multipleDeclaredLanguages": {}
}The codeql resolve queries command can also resolve the local file paths of queries from installed query packs.
To resolve the queries from the core query query-pack for a given supported <language> value, run:
codeql resolve queries --format=json -- codeql/<language>-queriesThe following query-packs should be pre-installed in any workspace created for this repository, but you can (re)install them using the codeql pack install command:
codeql/actions-queriescodeql/cpp-queriescodeql/csharp-queriescodeql/go-queriescodeql/java-queriescodeql/javascript-queriescodeql/python-queriescodeql/ruby-queries
Run codeql resolve queries -h for more information.
Run codeql resolve queries -h -vv for much more information.
codeql pack ls- List the CodeQL packs under some local directory pathcodeql pack install- Install library dependencies declared in a CodeQL pack
codeql resolve library-path- Resolve the local paths of CodeQL library dependencies for a given directory or query pathcodeql resolve metadata- Extract metadata from a given, local query pathcodeql resolve tests- Find QL unit tests in given, local directoriescodeql query run- Compiles and runs a local CodeQL query against a local CodeQL databasecodeql test run- Compiles and runs a local CodeQL query against the test database extracted from the unit test code source file(s)