[java:S8444] FP when validating more than 5 parameters

SonarQube: Community Build v26.6.0.123539
Java: 25
* Rule: java:S8444

The rule checks for excessive code before a super() or this() call. This is a fine goal. Unfortunately it only checks for a certain number of instructions in this area (default 5).

On the other hand this while feature is meant for argument validation and argument preparation. so, if I have 6 arguments to validate, there will be 6 instructions in this area.

I suggest to check for something like (number of arguments * 1.2). This should make much more sense.

Hello Marvin,

thanks a lot for your feedback, your assumption sounds reasonable. I’ve created JIRA ticket to tune allowed maximum instructions number. On the other side, this maximum number is configurable for this rule, so you can increase it to be applied globally across the project.

Here’s the Jira ticket