> For the complete documentation index, see [llms.txt](https://cover-docs.diffblue.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cover-docs.diffblue.com/features/cover-plugin/cover-plugin-settings/method-annotations.md).

# Method Annotations

To suppress compiler warnings for test methods written by Diffblue Cover, go to `Diffblue > Change Settings > Method Annotations` and update the `Warnings to suppress` list, as needed. The warnings or warning types defined here will be added to all test methods written by Diffblue Cover (as detailed below) using the `@SuppressWarnings` code annotation. This is especially useful when using SonarQube - see [Using SonarQube with Cover Plugin](/features/cover-plugin/cover-plugin-admin/using-sonarqube-with-cover-plugin.md).

<div align="left"><figure><img src="/files/1HwXeY0DvWDuA8gPTaLo" alt="" width="563"><figcaption></figcaption></figure></div>

**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:** `java:S1161`

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