Open Icedmang opened 8 years ago
I took a look at the code and it looks like SonarRunnerResult should be taking into account the isNew field on each issue if it's Preview mode. I had to make a number of upstream changes to use SonarRunnerIssue instead of Issue to account for this information. Currently, I have modifications to a local copy of the code that filters issues on this field as that's all the information I'm interested in within Netbeans.
A general comment, if you plan to support multiple versions of SonarQube, can I suggest you make a decision on what you want to support whether it's the latest SonarQube or remain backwards compatible for everything. Trying to be backwards compatible with one version is going to get ugly. If you want to be backwards compatible, perhaps it's time to consider different releases
Hi, I have the same issue, using the local analysis I would like to see only the new issue introduced by me. I tried to create a sonar-project.properties file in the project root with the parameter sonar.timemachine.period1=previous_analysis But it seems that the plugin doesn't care about this file. Is there some workaround to have this kind of analysis? Where is the properties file used by the radar plugin to perform the local analysis located?
Hi, @Gittino The plugin does not use a properties file. At this very moment, all the information is calculated from the Netbeans Project API and passed directly to sonar runner.
Hi @hmvictor, I tried version 3.0.1 and the issue still exists. Does closing mean this won't be fixed?
I'm closing old issues and keeping the new or more relevants open to focus the development. If this stills an issue, I can reopen but since I think there are two threads in this one maybe is better to create new issues. And because there were some API changes in SonarQube in the last versions is better to see what applies now.
@hmvictor 2 Issues meaning: 1) Get issues with Sonar Runner returning all issues. and 2) The use of properties file?
@Icedmang
Yes, exactly.
radar-netbeans Version 1454562877_radar-netbeans-2.5 SonarQube Server Version 5.4 (This may be the reason as it states support for Version 5.3)
Netbeans Product Version: NetBeans IDE 8.1 (Build 201510222201) Updates: NetBeans IDE is updated to version NetBeans 8.1 Patch 1 Java: 1.8.0_91; Java HotSpot(TM) 64-Bit Server VM 25.91-b14 Runtime: Java(TM) SE Runtime Environment 1.8.0_91-b14
Configuration Under Tools | Options -> Miscellaneous, Select SonarQube tab and choose "Analysis Mode for Runner" as "Preview".
I believe only the following Analysis Modes are available: Publish, Preview, Issues (Incremental is no longer supported) as mentioned in http://docs.sonarqube.org/display/SONAR/Analyzing+Source+Code
On unchanged code from a repository, I would expect to see 0 issues listed but instead see all of them as currently reported in the SonarQube dashboard
Running an analysis from the command-line using Maven seems to result in the expected result: