Configuration File Management

Coverity on Polaris

Version
latest
How to manage your configuration file including selecting a centralized mandatory configuration file with a set Coverity version.

Overview

Note the following:

  • If no configuration file exists, one is created in the project root directory.
  • If no file has been uploaded and the user has a local configuration file, it is the default.
  • When a configuration file is uploaded, the YAML Configuration used as the default for this project option is selected. If a local configuration file exists, it is used.
  • If a configuration file is uploaded and the YAML Configuration mandatory for the project (Required for Coverity Tool Version Feature) option has been selected, it becomes a centralized configuration file. Coverity on Polaris CLI will download it and use it. If a local configuration file exists, it is ignored by default. Users are not permitted to override it.

Selecting a Mandatory Configuration File

Only project administrators can set a mandatory configuration file to align all projects and teams.

To centralize and set the mandatory project configuration file:

  1. From the CLI use the following command to upload the configuration file:

    polaris analyze --upload-local-config

  2. Within the Web Interface navigate to: the project page > Settings > Analysis.
  3. Choose the YAML Configuration mandatory for the project (Required for Coverity Tool Version Feature) radio button.
  4. You can also set the tool version to ensure the same Coverity version is used with the mandatory file. To do this, use the Coverity Version pulldown to set the version, then click Set Version.
  5. To delete the Project YAML File, click Remove.

Screenshot of selecting manditory configuration file.

Using an Alternate Configuration File

To use a custom configuration file, use the --configuration-file option to the polaris command and specify the path name of the file if the file does not reside in the project root folder.

You can use this option with any polaris phase command; for example:

polaris --configuration-file myroot/configurations/polarisconfig.yml <any-command>

Note:

This is only allowed if centralized configuration compliance is not mandatory for the project.