`UnnecessarilyFullyQualified` is inconsistent between `module-info.java` and `package-info.java`
- Dominant language
- Java
- Stars
- 7.2k
- Forks
- 820
- Avg merge
- 5h 9m
- Merged PRs (30d)
- 50
Description
`UnnecessarilyFullyQualified` occurs for `module-info.java`:
```java
@org.jspecify.annotations.NullMarked
module foo {}
```
but not for `package-info.java`:
```java
@org.jspecify.annotations.NullMarked
package bar;
```
This inconsistency is troublesome. I'd much prefer to have the check apply to all files, changing the behavior for `package-info.java` files. However, `package-info.java` files were explicitly excluded from the check in https://github.com/google/error-prone/issues/1652. Ideally there would be a flag to indicate whether to exclude `package-info.java` and `module-info.java` files from the check.
Contributor guide
Research direction
Locate the implementation and tests for the UnnecessarilyFullyQualified check, then review the package-info.java exclusion discussed in issue 1652. Decide how the exclusion flag should cover package-info.java and module-info.java, and add tests showing both file types behave consistently under each setting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100