- Operating system: Debian 11.5
- SonarLint plugin version: 10.0.0.76954
- Programming language you’re coding in: java
- Is connected mode used:
- Connected to SonarCloud or SonarQube (and which version): yes, sonarqube 126.96.36.199497
we have set sonarqube server side folders exclusions (Administration > Analysis scope > Global source file exclusions, aka sonar.global.exclusions :
These files contains autogenerated java code, for which sonar checks are useless.
a) Running sonar in mvn command line :
- no warning are raised onto these files
- Got log : Excluded sources:
- Got log : 58 files ignored because of inclusion/exclusion patterns
- Checked within the sonar GUI : no warnings at all about the exclude files.
b) Running sonarlint onto intellij, connected to the same sonarqube server (with bindings up-to-date)
- Right click on project > SonarLint > Analyze with sonar lint => Warning are raised onto these files (which are excluded…)
- Based on what i know, in connected mode, exclusions are fetched from sonarqube server (from which exclusions are working, refer to point a)
- No log at all about exclusions onto the sonarlint console within intellij GUI
=> Why these files are not excluded by sonarlint intellij plugin?
=> Notice this is the same when opening a single auto generated file (which is sonarqube excluded) : there are sonar warnings onto this single file (but this file is sonarqube excluded, so no warnings should be reported)
c) Same as b, but with Settings > Tools > sonarlint > Project settings > Tab File exclusions : add
=> Same as b
=> I assume this is normal since sonarqube rules have precedence over local settings when running in connected mode
Tough, i do not understand why sonarqube exclusions (which are working in mvn command line) are not handled by sonarlint (point b)
This cause massive false positives sonar warnings inside the intellij GUI for these excluded files, which basically make the plugin not usable…
Is this a sonarlint bug?
Thank you by advance!