After upgrading from Sonarqube 10.5.1 to Sonarqube 10.7, the scans of some projects suddenly raised a lot of issues with scope test.
While I could not find any differences between 10.5 and 10.7 in the documentation Narrowing the focus with an analysis scope, the property sonar.test.exclusions must now be set to exclude test classes from the scan.
i.e. with Sonarqube 10.5.1 no issues in src/test/java/com/foo/FoobarTest.java and now it has issues for java:S1130 https://rules.sonarsource.com/java/RSPEC-1130/
TL;DR: As of SonarQube 10.6, and around the same time for SonarCloud, we started applying some of the main rules on to test code. See the announcement for more details.
In general, these rules should help everyone keep a maintainable test suite.
In particular, S1130 can be particularly useful when you are used to working with IDEs that grey out the throws Exception clause in the method signature when your test changes.
But, please let us know if you have any feedback on these changes.