Closed skysbsb closed 2 years ago
As you've seen the scala rules are explicitely excluded when building the metadata that the plugin will import into SonarQube. The way it works is that a Groovy script is used to generate the XML metadata files in a format that can be loaded into SonarQube.
There's an old PR to support Scala but apparently it was not working (https://github.com/spotbugs/sonar-findbugs/pull/237) I have recently started maitaining the plugin but I have not had the time to look into it, I do not use (or know) Scala myself but if you are interested, I think it would be good to add Scala support
Scala code should be analyzed in the latest version (4.1.3) of the plugin, so please consider testing, this should fix the issue Please let me know if there's any other problem
Issue Description
Hi everyone.
I am trying to use sonar-scanner to import a SpotBugs.xml output file from a manually SpotBugs run of a Scala only project to SonarQube.
This website contains a list of all possible bugs that findsecbugs can find: https://find-sec-bugs.github.io/bugs.htm
When I try to use sonar-scanner to import a previous gerenated SpotBugs.xml file from a Scala project, I get these output errors:
This is my sonar-project.properties file, inside the project directory:
I think that SonarQube with FindBugs (+FindSecBugs) plugins recognizes every rule, except those listed as SCALA?!
There is no rule PREDICTABLE_RANDOM_SCALA in SonarQube (+Findbugs plugin) rules, only PREDICTABLE_RANDOM which is related to Java:
I don't know if this is a expected issue.
Are Scala rules not imported by design using Findbugs+FindSecBugs plugin installed from SonarQube marketplace?
If this is the case, there is any roadmap for this issue? There is any workaround that I can follow to circumvent this problem?
Thanks in advance for any help.
Environment
Others relevant parts of the sonar-scanner output:
Update:
I saw this commit https://github.com/spotbugs/sonar-findbugs/commit/526ca6b29fae2684f86b1deba074a4be8a05b67e and now I have sure that this is a past design decision to exclude SCALA rules from the plugin... but i didn't understood why?! Can I edit this file and somehow activate those rules manually?