Hi all,
Thanks for raising this topic! I agree with the points shared about test code.
As a first step, we are enabling some Java rules that make sense in this context.
I’m happy to report that java:S1874 is included in the first batch of 20 rules now enabled for test code by default. This has been released in SonarQube 10.6 and is already available in SonarCloud. It will be coming in the following version of SonarLint too.
We are actively working on this, and we’ll continue to add more. Stay tuned!