September 1, 2022, 3:45pm
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
September 5, 2022, 6:40am
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?
(G Ann Campbell)
September 6, 2022, 11:53am
Can you provide a reproducer? I.e. code we can use to reproduce the problem?
September 7, 2022, 6:11pm
September 8, 2022, 3:49pm
@Damien_Urruty & @ganncamp - can I get an update please?
(G Ann Campbell)
September 8, 2022, 6:02pm
Thanks for the files. The language experts need to take a look at this. Hopefully they’ll be along soon.
September 11, 2022, 7:48am
@ganncamp Can I get an update?
September 14, 2022, 5:40am
@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.
September 14, 2022, 9:49am
@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
Sorry for the late reply. I tried to reproduce your issue, however, I think your reproducer is not complete.
Do you need 2 separate projects?
Which line on which file is reported as an issue in sonarlint? I can’t reproduce this behavior.
On which line and file the issue is reported in Sonarcloud but missing in sonarlint?
Also note, that screenshots of issue messages are useless for us. We need code snippets, where issues are reported/not reported.