A break ends a case that would end anyway

tx0/go:redundant-breakstrictwarningstyle

What it finds

case x: f(); break: a case of a switch or select ends by itself, so a break without a label as its last statement does nothing. A case whose only statement is break is left alone, since that is a common way to say that it does nothing on purpose.

The fix removes the statement, with its line when nothing else is on it.

From the rule's source, redundant_break.rs.

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:

tx0.toml
[rules]
"tx0/go:redundant-break" = "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/go:redundant-break] reason="..."

tx0 explain tx0/go:redundant-break shows the same in the terminal. Found a false positive? Report it.