The name of a field does not match the configured pattern
What it finds
The names of fields that are not static final are checked against the parameter pattern, by default [a-z][a-zA-Z0-9]*, lower camel case. Constants have a rule of their own, and static final fields of other types, such as loggers, are named either way in common practice and are left alone.
From the rule's source, field_naming.rs.
class Account { private String owner; private long Balance;tx0 reports: the field name Balance does not match [a-z][a-zA-Z0-9]* static int instance_count;tx0 reports: the field name instance_count does not match static final int LIMIT = 3; private static final Object LOCK = new Object();} 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:field-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:field-naming] reason="..."tx0 explain tx0/java:field-naming shows the same in the terminal. Found a false positive? Report it.