Using sonarlint (Bind to sonarcloud) in Eclipse, I executed sonarcloud rules in my Java project, and I ran the results through the command prompt to produce the report. However, the two reports are not identical; additional sonar problems are shown in SonarCloud.
Command prompt :
mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=XXX -Dsonar.login=XXXX -Dsonar.projectKey=XXX -Dsonar.projectName=XXX
Sonarscanner version :
Eclipse version : 2021-12 (4.22.0)
SonarLint : 7.4
Can anyone please help me here?
This can happen for a few reasons, could you check our FAQ and see if you fall into one of the cases ?
If it’s not the case, could you send us:
- one of the rule for which you observe an issue on SonarCloud and not in SonarLint
- a simple reproducer project that demonstrates the problem
Hello @Damien_Urruty ,
Thanks for your reply. I am seeing the rule repository is sonarqube.
Below rule is showing in sonarcloud but not showing in sonarlint in connected mode.
static" base class members should not be accessed via derived types
Below rule is showing in sonarlint in connected mode but not showing sonarcloud.
Lambdas should be replaced with method references
Sonarlint report from eclipse
Java version :
Could you please help me here?
Can you provide a reproducer? I.e. code we can use to reproduce the problem?
@Damien_Urruty & @ganncamp - can I get an update please?
Thanks for the files. The language experts need to take a look at this. Hopefully they’ll be along soon.
@ganncamp Can I get an update?
@ganncamp any update on this? I am waiting for your reply.
Hi S Riya,
I was about to try to reproduce your problem using the two GitHub repositories that you mentioned. But I saw a
bin folder in each of them with some
.class files. I don’t want to build a project that contains a file that I can not check before. I don’t understand why you add in GitHub the
.class versions of your java files. I don’t understand why your maven configurations is duplicated in those
bin folders. I don’t understand why this pom.xml file contains a typo, a
F at the beginning of the XML file that make it invalid.
@alban.auzeill - It was my mistake. I hope you will not face any issue now, I have corrected. Can you please reproduce the problem and let me know