The number of methods of a type is above the limit

tx0/java:method-countstrictwarningmaintainability

What it finds

A type with a great many methods offers too much in one place: callers have to find their way through all of it, and changes to it touch many concerns.

Counted are the methods a class, interface, enum or record declares itself, without constructors. A type above the parameter max, 40 by default, is reported.

From the rule's source, too_many_methods.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/java:method-count" = "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:method-count] reason="..."

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