Basically my question is: Is this a sonarqube bug or incorrect configuration? (The reported errors are from findbugs, this example is: findbugs:RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
)
What is my setup:
- Sonarqube 7.5 with a Kotlin (company wide) profile and a Java (company wide) profile enabled for my project
- Gradle 5.4 project with both Kotlin 1.3 and Java 11
I did not expect to see this findbugs warning in my Kotlin code, as the check that produces this warning is part of the Java profile.
To the best of my knowledge I cannot configure which profile to apply to which part of my code in de Gradle configuration. It happens automagically in Sonarqube.
So the next approach was to suppress the warnings. Both @Suppress
from Kotlin and @SuppressWarnings
from Java fail to suppress the issue.
Edit: That is the topic of SonarQube: How to suppress a warning in Kotlin code. Recent updates may yield different results. If that helps I’ll update.
Any tips on how to remove these Sonar issues from my project? I would prefer keeping the findbugs checks enabled.