Sonarlint is not properly link with sonar Rules in remote sonarqube server

1,947 views
Skip to first unread message

devops...@gmail.com

unread,
Apr 23, 2018, 1:46:48 PM4/23/18
to SonarLint
Hi
I am using sonarqube server 6.7 and sonarlint tool 3.4.
I am using apex plugin to scan the Saleforce project and getting the reports fine in sonarqube server. 
when I connect sonarqube server with my local eclipse using sonarLint tool , it analyzes the code and shows 0 issues found  which means that rules from the remote server is not properly taken.
Is this plugin in remote server is supported?..Can anyone suggest me to solve this Issue.

jbarr...@classy.org

unread,
Apr 29, 2018, 12:42:08 PM4/29/18
to SonarLint
Hi,  I am facing a similar issue.  Except that I created a project on my SonarQube and connected my eclipse project to it. I can still analyze the code on eclipse but I can't see any of the data on my local sonarqube project.  Any idea why? 

janos....@sonarsource.com

unread,
Apr 30, 2018, 2:44:16 AM4/30/18
to SonarLint
Hi,

SonarLint currently doesn't support any third party plugins. Only the plugins listed here are supported in SonarLint. In case of the apex plugin I'm afraid you cannot benefit from SonarLint.

Cheers,
Janos

janos....@sonarsource.com

unread,
Apr 30, 2018, 2:47:17 AM4/30/18
to SonarLint
Hi jbarr,

From which plugin do you expect to see issues? If it's not a third party plugin, then it should be supported. If that's the case, please share some more details, including the version of SonarQube, the analyzers, and some example issues that you see on SonarQube but not in SonarLint.

Cheers,
Janos

Janet Barrientos

unread,
Apr 30, 2018, 11:39:26 AM4/30/18
to janos....@sonarsource.com, SonarLint
Hi Janos, 

The eclipse plugin is the supported Sonarlint plugin it is not a third party plugin. The SonarQube version number is 7.1.0.11001  my Sonarlint version is 3.5.0.201804241315 both were downloaded from the official SonarLint/SonarQube website. 

The main problem that I am having is that my eclipse plugin believes that my project is bound to my local SonarQube server but my SonarQube server is not recognizing it.  Below are some pictures illustrating this problem. Do you have any idea why this is happening? 

Thanks, 
-Janet


SonarQube plug in in eclipse: 


Here is the local server, which has a remote project that I created on the server side and the project that is bound to my eclipse project.  However, this project doesn't realize that it is bound and any analysis that done to the eclipse project doesn't get synced to the local server project.





--
You received this message because you are subscribed to a topic in the Google Groups "SonarLint" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarlint/SI21St57Ta4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/83ea4676-9530-42b3-935d-d41dd6743e5c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

janos....@sonarsource.com

unread,
May 1, 2018, 2:44:52 AM5/1/18
to SonarLint
Hi Janet,

There is a misunderstanding about how SonarLint and SonarQube work. Let me clarify that.

SonarQube is a service to centralize the management of issues in projects. You use a SonarQube scanner to push reports to the SonarQube server. The scanner always works with a specific server. It downloads all the plugins (better to call analyzers, really) from the server, executes them on your source code and pushes a report to the server.

SonarLint is a developer tool. Developers use it in their IDEs (Eclipse, IntelliJ, ...) to catch bugs before they even exist. SonarLint doesn't push any reports to SonarQube. It's not the goal of this tool.

SonarLint in standalone mode uses its builtin analyzers and the default set of rules. SonarLint in connected mode uses the analyzers available on the SonarQube server it is connected to, and the rules configured for the project. It also hides issues that were marked as resolved on the server, such as False Positive and Won't Fix.

With that background, now on to your questions. Your SonarQube shows that the project was not analyzed yet. SonarLint doesn't do that, you need to run a scanner. There are different flavors of scanners to make this as easy as possible. There is a scanner for Maven projects, Gradle projects, and others. These dedicated scanners help reduce the configuration you need to do. For example, Maven, Gradle, etc know where are your source, test, bytecode files, so you don't need to configure them. There is also a Scanner for CLI, that can work with any build system, but it requires that you configure everything manually. Once you analyze your project with a scanner, you will be able to see it in SonarQube, customize the quality profile with its active rules, resolve issues as needed. 

I hope this helps.

Cheers,
Janos

Janet Barrientos

unread,
May 1, 2018, 1:45:53 PM5/1/18
to janos....@sonarsource.com, SonarLint
Hi Janos, 

Thank you yes, this does make a lot of sense, but after running the scanner locally against my project and my local sonarQube server. It appears that the project is being recognized but my code is not showing as having been analyzed. Any clue as to why that could be? 

Thanks, 
Janet

--
You received this message because you are subscribed to a topic in the Google Groups "SonarLint" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarlint/SI21St57Ta4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarlint+unsubscribe@googlegroups.com.

Janos Gyerik

unread,
May 2, 2018, 1:51:57 AM5/2/18
to Janet Barrientos, SonarLint
Can you be more specific?
--

Janos Gyerik | SonarSource

Software Developer

http://sonarsource.com


Are you using SonarLint in your IDE?

Janet Barrientos

unread,
May 2, 2018, 11:58:51 AM5/2/18
to Janos Gyerik, SonarLint
Hi Janos, 

Actually, I got that part to work with Maven, thanks so much. You really have been a great help.

-Thanks, 

Janet
Reply all
Reply to author
Forward
0 new messages