Using the following versions:
SonarQube: 8.9.1.44547
SonarLint (Eclipse): 6.0.0.34844
Have setup SonarQube with a project that uses a new Quality profile (not inherited from default) and have attached this new profile to the project.
We have connected two developer eclipse instances to SonarQube and on some files they are getting different issues shown up with the blue line by SonarLint.
From my instance I also see the same issue and the SonarLint checks seem to stop about two thrirds the way down one java source file.
Have updated the bindings on each dev environment and from the SonarLint Console it says it’s using the correct Quality Profile.
Not sure what else I should check to make sure issues are being flagged consistently across all developer eclipse instances.
One example is for the rule: Method names should comply with a naming convention
Confgured with default pattern: ^[a-z][a-zA-Z0-9]*$
If I go into my Eclipse IDE and created a non-compliant method (from the rule description):
public int DoSomething() {
return 1;
}
This doesn’t get flagged by SonarLint.
Any help/suggestions would be greatly appreciated.
Hi Andy – I don’t have an answer for you, but your issue looks (at least superficially) similar to the one I posted a few days ago. You might want to follow mine (at Sonarlint not scanning Kotlin files) in case it’s helpful for your problem.
To understand where the issue is coming from, it could be useful to compare the logs of the 2 different developer boxes. Make sure you activate the ‘Verbose logs’ and ‘Analysis logs’ options in the SonarLint Console view, and trigger an analysis.
Could you then share the results from the 2 environments here ? Make sure you remove any sensitive information, if any.
First, SonarSource rules usually don’t report issues on test files except some specific rules that only apply to tests.
I think the developers don’t have the project configured the same way, as for DevB the file is detected as a test file, but not for DevA. This explains why DevB gets more issues than DevA, the file is considered as a main source file so most of the rules apply.
Thanks for the reply and apologies in delay getting back. I have asked devs to compare workspaces so hopefully we can find the differences. Will update when I have more…