The name of a local variable or parameter does not match the configured pattern

tx0/java:local-namingstrictwarningstyle

What it finds

The names of local variables and parameters, of methods, lambdas, catch clauses, resources and patterns alike, are checked against the parameter pattern, by default [a-z][a-zA-Z0-9]*, lower camel case. The unnamed variable _ is left alone.

From the rule's source, local_naming.rs.

Example from the rule's tests
import java.util.List; class Sums {  int sum(List<Integer> Values) {tx0 reports: the local name Values does not match    int total = 0;    for (int Item : Values) {tx0 reports: the local name Item does not match      total += Item;    }    int RESULT = total;tx0 reports: the local name RESULT does not match    Values.forEach(v -> {});    return RESULT;  }}
Highlighted lines are the ones tx0 reports, with its message under each; the other lines are left alone.

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/java:local-naming" = "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:local-naming] reason="..."

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