Sonar scanner for maven is including test files in analysis

Hi Team,

The sonarqube has started performing analysis on test files, which it didn’t consider and had it excluded previously. We are facing this issue post the recent upgrade to version 9.9 from version 9.6.

Sonarqube version: Developer Edition - Version 9.9
Sonar scanner version: 3.7.x

is the sonar maven expected to exclude all the test file without being specifically mentioned/excluded?
is there a change in newer versions where the exclusion has to be specifically mentioned?

Regards,
Vibin.J

Hi Vibin,

Are you sure your configuration didn’t change? We’ve always included test files in analyses - there are some rules that run on test files. But they’re treated explicitly as test files.

 
Ann