Using SonarQube with Cover Plugin

Tests written by Diffblue Cover may be reported as "code smells" by SonarQube. To suppress these warnings and reduce the reported "code smells" in the SonarQube output, go to Diffblue > Change Settings > Method Annotations and update the Warnings to suppress list, as needed - this will add the @SuppressWarnings code annotation to all test methods written by Diffblue Cover, as detailed below.

Example - all: all

Suppresses all warnings - adds the code annotation @SuppressWarnings({"all"})`

Example - types: unused,raw-types

Suppresses one or more "warning types" - this example adds the code annotation @SuppressWarnings({"unused","raw-types"})

Example - specific: squid:S2699

Suppresses one or more specific warnings (using warning codes) - this example, adds the code annotation @SuppressWarnings({"squid:S2699"}

If you want to configure SonarQube directly, please see Using SonarQube with Cover CLI.

Last updated