sonarqube-4.5

sonar-pdfreport-plugin-1.4 with Sonar 4.5.1

删除回忆录丶 提交于 2019-12-12 05:29:34
问题 I am using Sonar 4.5.1 and sonar-pdfreport-plugin-1.4 to run the build. PDF report is not getting generated an is showing below message : Internal error: Can't retrieve project info. Parent project node is empty. Authentication?. I saw a bug posted for this (https://jira.sonarsource.com/browse/SONARPLUGINS-3854) but would like to know what is the workaround available for this issue. User Authentication is already set for this in General Settings->Pdf report but doesn't work either. 回答1: This

Ignore missing documentation if superclass has documentation

筅森魡賤 提交于 2019-12-11 14:06:48
问题 Is there any way to tell SonarQube not to count an overriding method into the public documented api statistics if the overridden method is documented? SonarQube finds many methods lacking annotation due to the case below. I know there is an annotation to ignore certain rules of SonarQube, however we don't want to add code to our project in order to satisfy SonarQube. 回答1: You could use inherit doc. /** * {@inheritDoc} */ @Override 来源: https://stackoverflow.com/questions/34070485/ignore

Why does squid:S1166 not accept exception messages only when logging caught exceptions?

纵饮孤独 提交于 2019-12-10 15:16:13
问题 Quote from the description of the rule (SonarQube 4.5.5): // Noncompliant - exception is lost (only message is preserved) try { /* ... */ } catch (Exception e) { LOGGER.info(e.getMessage()); } By providing the exception class to the logger a stack trace is written to the logs. The problem in our code base is this: By following the Tell, don't ask principle, we use checked exceptions as part of the, what we consider, normal execution paths and we don't want them to result in unreasonably large

How to exclude/ignore referenced project(s) analysis from SonarQube

回眸只為那壹抹淺笑 提交于 2019-12-08 09:35:24
问题 I have a solution which has three projects (X,Y,Z). Z referenced in Y , Y in X . When I start Analysis with MSBuild SonarQube Runner on project X, it is analyzing Y and Z as well. Do we have any solution for ignoring recursive analysis ? Note: I can not breakup solution file into multiple solution files & refer dll's rather than projects. 回答1: you can add the tag into ProjectReference 'Y' of your project 'X' configuration. <PropertyGroup Condition=" $(ProjectGuid) != '' AND $(SonarQubeExclude

New Msbuild Sonar runner is skipping analysis for .net projects

浪尽此生 提交于 2019-12-08 04:25:56
问题 I have setup new Msbuild sonar runner and kickoff analysis for a project type "class library". It went successful. To test it further, I have created one more project which has only one file with 5 Interface definitions. I made sure that names of interfaces NOT started with letter 'i'. I created a quality profile with one stylecop rule i.e. "Interface names must begin with i". I started cmd prompt (VS command prompt) and change it's path to the directory which has .csproj file. Clearly I am

SonarQube Lombok Getter recognition

守給你的承諾、 提交于 2019-12-07 06:59:45
问题 I am using SonarQube 4.5.4 with Java plugin 3.1. As I know this sonar-java version supports Lombok partially (Getter and Setter annotations) starting from 2.8. But in my case it still reports field with lombok.Getter as: squid:S1068 Unused private fields should be removed: @Getter private String userName; Do you have any ideas why this could happen and where can I fix it? update For bytecode I tried both sonar.java.binaries and sonar.binaries I use sbt and run analysis with sonar-runner for

New Msbuild Sonar runner is skipping analysis for .net projects

亡梦爱人 提交于 2019-12-06 14:41:17
I have setup new Msbuild sonar runner and kickoff analysis for a project type "class library". It went successful. To test it further, I have created one more project which has only one file with 5 Interface definitions. I made sure that names of interfaces NOT started with letter 'i'. I created a quality profile with one stylecop rule i.e. "Interface names must begin with i". I started cmd prompt (VS command prompt) and change it's path to the directory which has .csproj file. Clearly I am NOT at .sln file level. precisely one more level down where we can see .csproj file. Fired Begin -

SonarQube Lombok Getter recognition

跟風遠走 提交于 2019-12-05 16:16:22
I am using SonarQube 4.5.4 with Java plugin 3.1. As I know this sonar-java version supports Lombok partially (Getter and Setter annotations) starting from 2.8 . But in my case it still reports field with lombok.Getter as: squid:S1068 Unused private fields should be removed: @Getter private String userName; Do you have any ideas why this could happen and where can I fix it? update For bytecode I tried both sonar.java.binaries and sonar.binaries I use sbt and run analysis with sonar-runner for below sonar-project.properties sonar.projectVersion=0.1 sonar.java.binaries=\ target/scala-2.11/classes

SonarQube - Combining Sonar way, FindBugs, PMD and Checkstyle without duplicates

删除回忆录丶 提交于 2019-12-03 12:30:32
问题 I'm looking for best practices using SonarQube with the FindBugs, PMD and Checkstyle plugins. How do the rules in SonarQube's default quality profile "Sonar way" relate to those of the plugins? Are they completely different rules or does the Sonar way contain the most important rules from those plugins? What is the best way of combining those rule sets? How can I avoid duplicate checks? Sonar v.3.x contains a "Sonar way with Findbugs" profile. I can't find it in v.4.5.1 - what happened to it?

Javadoc for sonar-plugin-api 4.5.2

那年仲夏 提交于 2019-12-02 08:31:39
For the development of my own SonarQube plugin, I am searching for the javadoc (api) of sonar-plugin-api-4.5.2, but I didn't find it on the internet. For the versions 3.x.x maven also downloaded the sources of the jar and so i was able to generate the javadoc out of it. But for the version 4.5.2 of sonar-plugin-api the sources are not part of the maven repository. So my questions are: Is there a javadoc/api for version 4.5.2 of sonar-plugin-api available online? Or where can I get the source of the version 4.5.2 so that i can generate the javadoc? Javadoc for all SonarQube versions can be