google / google/error-prone

Cannot suppress `AddNullMarkedToClass`, `AddNullMarkedToPackageInfo`

Open
#5,562 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7.2k
Forks
820
Avg merge
5h 9m
Merged PRs (30d)
50

Description

In Error Prone 2.45.0 through 2.48.0 the following suppressions have no effect:

```java
@SuppressWarnings("AddNullMarkedToPackageInfo")
package foo;
```

```java
@SuppressWarnings("AddNullMarkedToClass")
public class Foo {}
```

Other known-good suppressions work as usual, including `VoidMissingNullable` whether on method or class level. I assume, but did not verify, that the former has never worked.

If this curiosity is fine then documentation should probably suppress the suppression section. I only discovered this because I was constructing a synthetic example to check nullness analysis configuration.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.