@Deprecated is used without since or forRemoval, so readers cannot tell how old the deprecation is or whether removal is planned
What it finds
Since Java 9, @Deprecated(since = "2.3", forRemoval = true) records when a declaration was deprecated and whether it will go. Without them, every caller has to guess how urgent a migration is.
Reported is a @Deprecated annotation without arguments.
From the rule's source, deprecated_without_details.rs.
class Old { @Deprecatedtx0 reports: neither since when void run() {} @Deprecated(since = "2.0", forRemoval = true) void stop() {}} Turn it on, off or suppress it
The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/java:deprecated-without-details" = "warning"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/java:deprecated-without-details] reason="..."tx0 explain tx0/java:deprecated-without-details shows the same in the terminal. Found a false positive? Report it.