Specifying command options in a CodeQL configuration file

Save time by adding your frequently used command options and custom CodeQL packs to a CodeQL configuration file.

Using a CodeQL configuration file

  1. Create and save a config file under your home (Linux and macOS) or user profile (Windows) directory in the .config/codeql/ subdirectory. For example, $HOME/.config/codeql/config.

  2. In the config file, specify the options you want to apply to your CodeQL commands. The syntax for specifying options is as follows:

    <command> <subcommand> <option> <value>
    
  3. To apply the same options to more than one command, you can:

Note

Examples