Skip to content

Latest commit

 

History

History
74 lines (54 loc) · 2.67 KB

File metadata and controls

74 lines (54 loc) · 2.67 KB
description Reference for the codeql resolve queries command

Command Resource for codeql resolve queries

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

Primary use of codeql resolve queries

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": {}
}

Alternative uses of codeql resolve queries

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>-queries

The 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-queries
  • codeql/cpp-queries
  • codeql/csharp-queries
  • codeql/go-queries
  • codeql/java-queries
  • codeql/javascript-queries
  • codeql/python-queries
  • codeql/ruby-queries

Help for codeql resolve queries

Run codeql resolve queries -h for more information. Run codeql resolve queries -h -vv for much more information.

Command commonly run BEFORE codeql resolve queries

Commands commonly run AFTER codeql resolve queries