Sonar eclipse plugin needs sonar server installed - sonarqube

Is Sonar eclipse plugin needs a valid sonar server installed locally or remotely to do the quality profiles in eclipse.
Thanks,
cabear

As per the "Configuring SonarQube in Eclipse" documentation page, you can see that this is indeed required to have a SonarQube server installed somewhere.
If your project is not already under analysis, you'll need to declare
it through the SonarQube web interface.
Once your project exists in SonarQube, you're ready to get started
with SonarQube in Eclipse.

Related

PL/SQL plugin not working in SonarQube

I want to use SonarQube for PL/SQL. I downloaded the plugin from the SonarQube Site and placed it into $SONARQUBE_HOME/extensions/plugins. Then I restarted the SonarQube Server but it didn't start up. When I removed the plugin it was working.
How can I resolve this issue?
The PL/SQL language is supported as part of the SonarSource Developer Edition, which is a commercial package for which you need a license.
This is why if you install it manually, this will not work.

Can i run analysis with sonarlint and see the same on sonarqube server without involving sonar scanner at all

I have installed Sonar Scanner and Sonar Qube and i am running code analysis with Sonar Scanner and i can see the results on Sonar Qube server in bowser. Also,I have SonarLint added in my VS2015 and i am using connected mode with my sonar qube server. And i run analysis with sonar lint also locally.
Sonar Scanner is a program that connects to a SonarQube server, downloads analyzers and active rules, runs the analyzers locally on your source code, and finally pushes the analysis results to SonarQube, so that you can manage the quality of your source code on SonarQube.
SonarLint is designed to analyze files as you work on them in your IDE (VS2015 in your case). It does not produce analysis reports and does not push them to SonarQube server. Not even in connected mode. The purpose of connected mode is to use the same analyzers and same rules as configured on SonarQube. Pushing analysis reports to the server is out of the scope of SonarLint.
In short, if you want to see analysis results on SonarQube and manage the quality of your software, you cannot skip the Sonar Scanner.

Sonarqube and code testing

I want to run sonarqube testing on my sonarqube server and want to see test result (test report) from my client machine without touching server.
How can I do that in case of multiple developers will push their code to test on sonar server and need to see test result from their local machine?
There is the http://www.sonarlint.org/ plugin available for eclipse, IntelliJ IDEA and Visual Studio. The plugins for first two IDEs support Java, JavaScript and PHP, the plugin for Visual Studio supports .NET code.
All three offer the Connected Mode which can "establish a connection to a SonarQube server (4.5.4+) and bind your [...] project to a SonarQube project."
This might help you depending on your development environment.

SonarQube TFVC Plugin with VSTS

is it possible to make the TFVC Plugin of SonarQube work with VSTS?
If I want to use the Plugin to connect with the TFVC of our VSTS-Account I get a not authorized exception. I'm pretty sure that the credentials are correct. Or Are there any special rights which are needed for that?
19:54:37.632 ERROR - Unable to TFS annotate the project which raised the following authentication exception: TF30063: You are not authorized to access xxx.visualstudio.com\DefaultCollection.
the configuration seems all correct, because the plugin works with a TFS2015-Server without any issues.
I'm Testing the plugin localy with the sonar Scanner V1.1.
SonarQube Version 5.2, TFVC Plugin Version 2.1
Thank you for your help!
Apparently this scenario is not supported yet. I ran into the same problem and I found the following issue on the backlog of the SonarQube team:
With the current TFVC Annotate plugin code author information is not seen for VSO hosted builds, this MMF is to enable the same.
You can find this information on: https://jira.sonarsource.com/browse/MMF-85
So until they fixed it I fear you'll need to disable this plugin...

SonarQube ecosystem upgrades (SonarQube and SonarLint)

We are using SonarQube 5.1 and want to upgrade to SonarQubee 5.2 or 5.3 due to some issues around issue assign area of SonarQube 5.1
We are also using SonarQube eclipse plugin 3.5.0
I noticed recently that SonarQube eclipse plugin 3.5.0 is not supported with SonarQube 5.2 as per http://docs.sonarqube.org/display/SONAR/SonarQube+in+Eclipse.
Also latest SonarLint release 1.2 cannot connect to remote Sonar Instance to fetch server rules. This feature was available with SonarQube eclipse plugin 3.5.0.
I found on Stackoverflow that SonarLint would support this feature with release 2.0 but there is no planned release date for 2.0
Getting remote config file for SonarLint if online, using local if offline
My question is why SonarQube ecosystem upgrades are not synchronised?
SonarQube eclipse plugin should support latest SonarQube releases until SonarLint is capable to connect to remote Sonar instance to fetch server rules.
How anyone who are supposed to take SonarQube upgrades to resolve problems with existing version could execute eclipse analysis?
As you have read, the SonarQube Eclipse plugin has been deprecated in favor of SonarLint for Eclipse. One of the main reasons behind this is that SonarLint for Eclipse is designed to be an independant product which lifecycle must be decoupled from SonarQube - in order to ease and speed up innovation on the user experience in the IDE. So by now, SonarQube and SonarLint upgrades are not synchronized by definition.
Still, your question is perfectly valid: why don't we make some last updates on the SQ Eclipse plugin as long as SonarLint is not able to connect to a SonarQube server? The main reason is that we believe so much in SonarLint that we want to focus all our attention and energy on that product, and therefore we want to move fast to be able to have the "connected-to-SonarQube" experience as soon as possible. Our telemetry tells us that most existing users and customers are currently using a SonarQube version that is still usable with the SQ Eclipse plugin, so I feel this is the right decision to work as fast as possible on SonarLint to make sure it can connect to a SonarQube instance in the upcoming months (when the next LTS is released).
The following combination works fine
(SonarLint + SonarScanner + SonarQube + Eclipse):
SonarLint: 3.5.0.201804241315
sonarScanner: sonar-scanner-3.2.0.1227-windows
SonarQube: 6.7.4 (build 38452)
sonar-scanner.properties:
sonar.host.url=http://localhost:9000
sonar.sourceEncoding=UTF-8
sonar.projectKey=JavaProject
sonar.projectName=MyJavaStandaloneProject
sonar.projectVersion=0.0.1-SNAPSHOT
sonar.sources=D:/eclipse/workspace/MyJavaStandaloneProject
sonar.java.binaries=D:/eclipse/workspace/MyJavaStandaloneProject/target/classes
pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.2</version>
</plugin>
</plugins>
</build>
Bind Eclipse projects to SonarQube projects:
Select a SonarQube server: localhost
Eclipse Project: MyJavaStandaloneProject
SonarQube Project: 'MyJavaProject' on server localhost
Click: Auto bind selected projects.
"Note: SonarQube Project: 'MyJavaProject' on server localhost
can be auto configured by clicking Auto bind button."
All configurations done.
Right click project and Run As Maven build ...
Goal: sonar:sonar
[INFO] ANALYSIS SUCCESSFUL

Resources