SonarLint plugin not working in Eclipse Oxygen
I am trying to get SonarLint plugin working in Eclipse but I am not having much luck. More specifically, I don't see any issues detected or highlighted in the "SonarLint On-the-fly" tab when looking at a simple Java class in a Java project.
I use the following software.
Win 10 Pro - Version 1709
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
Version: Oxygen.3 Release (4.7.3)
SonarLint Eclipse plugin:
org.sonarlint.eclipse.site-3.4.0 source: https://www.sonarlint.org/eclipse/
SonarQube 7.0 source: https://www.sonarqube.org/downloads/
sonar-scanner-18.104.22.1681 source: https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner (Windows 64 bit - link)
I downloaded the SonarLint Eclipse plugin and successfully installed it in Eclipse. I can see all the SonarLint tabs and configuration options.
I downloaded and successfully setup SonarQube server (localhost on the default port 9000). I also downloaded and set up Sonar Scanner.
I created a simple Java project in Eclipse and I created a Java class in it. I added the sonar-project.properties file to the Java project.
# must be unique in a given SonarQube instance sonar.projectKey=sp # this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1. sonar.projectName=Simple Project sonar.projectVersion=1.0 # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. # This property is optional if sonar.modules is set. sonar.sources=. # Encoding of the source code. Default is default system encoding #sonar.sourceEncoding=UTF-8
My Eclipse Java project looks like this:
I have set up my project bindings successfully.
I can start the SonarQube and login without issues. I navigated to the location of my "Simple Project" in Windows Explorer and opened a Windows PowerShell from there.
I executed the command sonar-scanner in the Windows PowerShell which successfully scanned the Simple Project and I can see the results in my SonarQube server.
So all is good so far. BUT... There is no indication of issues in Eclipse. I don't see any issues under the SonarLint On-the-fly tab in Eclipse.
I do have "Run SonarLint automatically" enabled (checked) and I also tried to manually analyze the App.java file by right-clicking on the file > SonarLint > Analyze.
I see no issues underlined in either the code or listed in the "SonarLint On-the-fly" tab. I must be missing a step somewhere. Could anyone please give me any tips how to get the automatic SonarLint issue detection working in Eclipse?
It turns out that the issue was in my package naming convention. Changing the package name from "com.test.pckg" to "com.dev.pckg" resolved the issue.
Jonathan in the SonarLint Google Group pointed out the following:
Sonarlint in Eclipse has no way to see which files are tests and which are sources, so it uses a simple regexp, looking for the keyword test anywhere on the path of the file. From your screenshots, your file is in a folder named test, so only the test rules are applied to it.
Try to place the file in a package without the word test in the path, or check in Sonarlint options to see if you can edit the regexp.
Issues not showing up in SonarLint, In SonarLint Eclipse it is different since Eclipse wasn't making a difference between (it has changed in Oxygen, but we only take advantage of that since SonarLint 4.1). But if you have installed SonarQube plugins running third party code How to integrate SonarLint plugin with eclipse and enable SonarLint to development project to check code quality On June 3, 2017 June 3, 2017 By vindyahettige In IT This blog post is about how to get started using SonarLint with Eclipse to get on-the-fly feedback on code quality issues while using the IDE.
You can change preferences search in Window -> Preference -> Type in the search textFile "SonarLint" and first option you can delete the next option "Test file regular expressions" and u can use it in test files :)enter image description here
SonarLint, That seems to be a problem for SonarLint as it produces these messages: Though it was working fine in Oxygen and Neon. Unable to read Warning message This page is a generic help page, and only shows basic information about software installation from the Eclipse Marketplace.
I had offline tried to install sonarlint into Eclipse as my marketplace was not working. After successfully installing the plugin I was not able to see the feature enabled. it didn't reflect after installation. So I downloaded a new eclipse IDE and then I was able to install sonarlint through the marketplace. After that it got reflected in Project Code.
SonarLint doesn't display / hightlight issues in Eclipse Oxygen , I installed SonarLint plugin in Eclipse but it doesn't appear to work for me. I don't see any issues highlighted in the code or listed in the Drag to your running Eclipse * workspace. Add this URL to your Eclipse Installation to reach this solution's update site. SonarLint is an IDE extension that helps you detect and fix quality issues as you write code. Like a spell checker, SonarLint squiggles flaws so they can be fixed before committing code. You can get it directly from the
SonarLint plugin not working in Eclipse Oxygen, sonarlint not showing in eclipse how to install sonarlint plugin in eclipse sonarlint rules eclipse export sonarlint report from eclipse sonarlint not showing issues In Eclipse preferences you can choose which rules should be active or not. You can also mute rules on-the-fly via a quick-fix option, or from the list of issues. Find logs if you need them. Under the Eclipse Console view, show the SonarLint Console, and optionally activate analysis or verbose logs.
Eclipse extension, SonarLint plugin available in Eclipse SonarLint. Use SonarLint in Eclipse. Version 5.0 Detect Code Quality and Security issues on the fly in: Compatible with Please check out my blog(http://learnsimple.in) for more technical videos. In this video, I explained how to integrate sonarlint plugin with Eclipse. For any
How to integrate SonarLint plugin with eclipse and enable SonarLint , After installing the plugin issues will be reported as Eclipse markers. SonarLint is free, open source, and available in the Eclipse Marketplace. The SonarQube Eclipse plugin does not work with SonarQube 5.2+. It is replaced by SonarLint for Eclipse. Note that SonarLint for Eclipse 1.x series do not cover yet all the features of SonarQube Eclipse plugin, but versions 2.x will definitely cover this gap.