A test is switched off with @Disabled or @Ignore without a reason
What it finds
A disabled test stays disabled until someone knows why it was switched off. The value of @Disabled or @Ignore keeps the reason next to it and shows up in test reports.
Reported is @Disabled or @Ignore without arguments.
From the rule's source, disabled_test_without_reason.rs.
class SkipTest { @Disabledtx0 reports: without a reason void a() {} @Disabled("flaky on Windows, see the issue tracker") void b() {}} 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:disabled-test-without-reason" = "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:disabled-test-without-reason] reason="..."tx0 explain tx0/java:disabled-test-without-reason shows the same in the terminal. Found a false positive? Report it.