Sonarlint sync issues on maven multi-module project

sonarlint
sonarqube

(Peter Bugan) #1

Env :

  • Sonarqube 7.3
  • Sonarlint Eclipse 3.6.0

Analyzed project is organized with maven multi-module, like this :

  • org-key:root
    |- moduleA
    |- moduleB

ModuleA is a frontend module which is opened with WebStorm
ModuleB is a backend module which is opened with Eclipse

On Sonarqube we have configured few entries on “Ignore Issues on Multiple Criteria” on the root project (because this is the only place this kind of configuration can be put, cannot be done on a sub-project).
These configuration entries discard some rules on some java packages into ModuleB.

This works well on Sonarqube, but there is a problem with Sonarlint :

If we bind the Eclipse ModuleB project to “org-key:root”, rules are well discarded and not reported by sonarlint, following the multiple criteria entries, BUT any “Resolved” issues (won’t fix, false positive, …) are still reported wrongly

If we bind the Eclipse ModuleB project to “org-key:moduleB”, rule discarding from multiple criteria entries does not work anymore and issues are reported wronly, BUT this time all “Resolved” issues disappear correctly !

To solve this problem, we think that each sub-project should inherit all the root project configuration before applying specific sub-project configuration (overriding or not) and so allow the binding to be on sub-project.

Currently it is very annoying to choose between “let sonarlint report all discarded rules” or “let sonarlint report all resolved issues” …


(Janos Gyerik) #2

We are aware of this problem. And this is fixed in the hot new release of 4.0. It’s so hot it has not been announced yet, but it’s already available in Eclipse marketplace. (The official announcement and website update is coming very soon.)

The fix is part of a greater ongoing effort of dropping the concept of modules. Although that’s not complete yet, what we already have for Eclipse should be good enough to handle your use case. In this new release, there is no more binding to modules, only to projects. As such, your Eclipse projects (Maven sub-modules) should correctly benefit from the project-global settings, and at the same time resolved issues in any module should be correctly hidden.

I hope upgrading to 4.0 is a viable option for you, and please let us know how it goes.


(Peter Bugan) #3

Thank you very much ! It works as expected with the 4.0 release ! Thank you again.

On the IntelliJ side, do you know when the 4.0 release will be available ?