Configuring Incremental Analysis (LCA)

Configure the plug-in to run incremental analysis (LCA).

Note: This platform is renamed Coverity on Polaris.References to Polaris or Polaris Software Integrity Platform in this documentation and screenshots are referring to Coverity on Polaris.

For the Coverity on Polaris plug-in to access the builds information using the Azure API, you must enable scripts access to the OAuth token by clicking Agent job and then selecting the Allow scripts to access the OAuth token checkbox under Additional options. This enables scripts and other processes launched by tasks to access the OAuth token through the System.AccessToken variable. You can also configure this requirement through Azure environment variables.
OAuth token access checkbox

When you’ve added the plug-in and configured the Coverity on Polaris Service endpoint, do the following steps:

  1. Configure a value for $CHANGE_SET_FILE_PATH or leave as the default value, which is .synopsys/polaris/changeSetFile.txt
  2. Type the command to run incremental analysis (LCA), for example, analyze -w --incremental $CHANGE_SET_FILE_PATH
  3. Select the Populate SCM changeset in file at $CHANGE_SET_FILE_PATH for incremental analysis checkbox.

    The plug-in sets POLARIS_FF_ENABLE_COVERITY_INCREMENTAL=true when the populate changeset option is enabled.

  4. Select the Succeed or Fail option from the drop-down menu for the When static analysis is skipped because the changeset contained no files to analyze option.
    Configuring incremental analysis (LCA)

    When the changeset is empty, the task will not run the CLI and you can configure the result to either Succeed or Fail

    By default, the Coverity on Polaris CLI installs local analysis tools, which are over 3 GB.

    Synopsys Recommendations
    • To use incremental analysis, you must install the analysis tools on a self-hosted agent before running the Coverity on Polaris CLI and specify the tools location in your polaris.yml file.
    • When you install the analysis tools, ensure that you are installing them in the same POLARIS_HOME location that the agent uses.

    Example of a typical installation that you can specify in the yaml file:

    install:
      coverity:
        version: "2020.09"
        directory: "C:\\.synopsys\\polaris\\coverity-analysis-tools\\cov_analysis-win64-2020.09"