Local analysis in Eclipse ignores rule configuration of the Quality profile

connected_mode
eclipse
sonarlint

(Jérémie Bresson) #1
  • versions used:

    • SonarQube: Version 7.0 (build 36138)
    • SonarLint for Eclipse 3.5.0.201804241315 org.sonarlint.eclipse.feature.feature.group
  • Rules:

    • Field names should comply with a naming convention (squid:S00116)
    • Local variable and method parameter names should comply with a naming convention (squid:S00117)

We are using a Quality profile where we have modified the configuration the for the rules squid:S00116 and squid:S00117: we have changed the regex.

Projects in Eclipse are bound to the the SonarQube server. Sonar-on-the-fly analysis in Eclipse does not consider the configuration for the rules and stick to the default configuration.

Is this a known issue?


(Nicolas Bontoux) #2

Hi Jérémie, just checking: did you Update the bindings on SonarLint side ?


(Jérémie Bresson) #3

You are right my Eclipse was out of sync…

How do you force an update of the config from the Server?

How I did it:
I did on the project context menu: SonarLint => Unbind project
And then: SonarLint => Bind to a SonarQube project… with “Auto Bind” button.

Now I see the configured regex in my Eclipse (when I set the variable name to something illegal).

This is great thank you a lot. Sorry for my mistake.


(Nicolas Bontoux) #4

No prob’. You did do a full unbind/rebind here. On a more regular basis you can also go in the SonarQube Servers view, select a server and ‘Update all project bindings’. If it detects a change, SonarLint itself may also prompt a small in-IDE notification asking if you wish to Update the bindings.