Consider Lombok val as valid type for S2159 and S2175

Hello,

SonarJava is not supporting Lombok, and does not plan to support it. Lombok features such as val are currently only going to create noise with our rules. Handling it properly would add extreme complexity to their implementation, which we want to avoid at all cost.

Now, handling type inference with the approach you are proposing is a bit too extreme for us, and would have as consequences to introduce False Negatives for cases which are NOT relying on Lombok. We are however already filtering the issues generated by a few rules to avoid making too much noise, when we detect Lombok cases.

I consequently created the following ticket to adapt our filter to also consider S2159 and S2175: SONARJAVA-3089.
It won’t solve everything, and will potentially introduce FN when using Lombok, but it will reduce the noise.

Regards,
Michael