Cannot pick up latest SQ profile change in Eclipse using SonarLint


(Andy Lachapelle) #1

Hi,

I am using Eclipse Oxygen.3 Release 4.7.3 with SonarLint 3.6 Installed. I made a change to the Project Profile on SonarQube - simply changed the severity on a rule (squid:s106) from Major to Critical. I made sure to update the project bindings, and that seemed successful. However, when I do a SonarLint => Analyze on the project in Eclipse, it still seems to be picking up the default severity of Major on the rule. I have been binding and unbinding and logging out and back into Eclipse, and just can’t seem to pick up my change. I made sure to double check the profile with the change is attached to the Project in SonarQube. Any idea what I may have missed? Thanks for any help you can provide.


(Andy Lachapelle) #2

After some more experimentation it appears that I need to do a Jenkins build after a change to the profile in order to pick up the change via rebinding to the SonarQube server for SonarLint in Eclipse. Seems like an extra and unnecessary step but that’s how it seems to work.


(Colin Mueller) #3

Andy,

I would expect the issue severity to not change prior to a new analysis because the issue is still marked with the old severity on your SonarQube server. Once a new analysis has finished following a Quality Profile change (in this case, changing a rule severity), the issue’s severity would reflect the change and therefore you would see the change in SonarLint.

I would also suspect if you introduced a brand new issue in your code violating the same rule, SonarLint would detect it with the new severity prior to rebuilding.

Colin


(Andy Lachapelle) #4

Colin, I agree, that’s what I expected, but I’ve tried it seven ways to Sunday and the key seems to be to do a Jenkins build with the new profile. Once I do that, everything works fine. Kind of awkward but not terrible I guess.