A method body has more lines of code than the limit
What it finds
A method whose body runs over many lines does several things, and each change to it has to be understood against all of them.
The length is the number of lines of the body that hold code: lines with only comments or nothing on them do not count. The limit is the parameter max-lines, 100 by default.
From the rule's source, long_method.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:
[rules]
"tx0/java:long-method" = "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:long-method] reason="..."tx0 explain tx0/java:long-method shows the same in the terminal. Found a false positive? Report it.