A case runs on into the next one without a comment saying it is meant

tx0/java:switch-fallthroughrecommendedwarningbug

What it finds

A case whose statements can complete normally runs on into the statements of the next case: without a break, return, throw or continue at its end, a value matched by the first label also runs the code meant for the second. When that is meant, a comment before the next label says so.

Reported are groups of statements that certainly complete normally and are followed by another group, unless a comment on a line of its own comes right before the next label.

From the rule's source, switch_fallthrough.rs.

Turn it on, off or suppress it

The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/java:switch-fallthrough" = "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:switch-fallthrough] reason="..."

tx0 explain tx0/java:switch-fallthrough shows the same in the terminal. Found a false positive? Report it.