# 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/DQxHkQXcs60BDEO1G0Jp" 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"}`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cover-docs-preview.diffblue.com/features/cover-plugin/cover-plugin-settings/method-annotations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
