SonarQube Frequently asked questions (FAQ)

sonarqube-faqs

 

SonarQube Frequently asked questions (FAQ)

Is SonarQube Replacement for Checkstyle, PMD, FindBugs?
————————————————————–

Answers – YES and NO

Why Yes?
Sonar will run CheckStyle, FindBugs and PMD, as well as a few other “plugins” such as Cobertura (code coverage) by default for Java projects. The main added value, however, is that it stores the history in a database. You can then see the trend. Are you improving the code base or are you doing the opposite? Only a tool with memory can tell you that.
Why No?
SonarQube is currently on the way to deprecate PMD, Checkstyle and Findbugs and use their own technology to analyze Java code (called SonarJava). They do it, because they don’t want to spend their time fixing, upgrading (or waiting on it) those libraries (e.g. for Java 8), which for example uses outdated libraries. Well at least since SonarQube 6.3+ it seems to be that Findbugs is (at the moment) no longer supported as a plugin.

 

What is the SonarQube Plugins available which can be integrated with Eclipse, IntelliJ IDEA, Visual Studio, Visual Studio Code, and Atom?
————————————————————–
Answer –
SonarLint is an extension to your favorite IDE that provides on-the-fly feedback to developers on new bugs and quality issues injected into their code.
Reference

 

Where i can get the Support related to SonarQube?
————————————————————–
Google Grops
Facebook Groups
Linkedin Groups
Public Forum

 

Top 10 Lessons Learned from 2 Years Work with Codehaus Sonar
————————————————————–

 

Configure Sonar to exclude files from Maven pom.xml
————————————————————–

 

Does Sonar support multiple language in same project ex. sonar.language=java,grvy?
————————————————————–
Starting with SonarQube 4.2, multi-language projects are supported.
This automatically happens when sonar.language is not set.

 

How to exclude the directory in SonarQube?
————————————————————–
try something like this:
sonar.exclusions=src/java/test/**

sonar.exclusions=system/**, test/**, application/third_party/**, application/logs/**

How to Increase SonarQube Heap Size?
————————————————————–
Whenever you get a issues like “SonarQube analysis failed java.lang.OutOfMemoryError: Java heap space”, you may following options to follow.
Option 1 – Reduce the analyze scope by either reducing the project size(split your project in smaller sub projects/modules) or reducing the set of rules that are analyzed.
Option 2 – Increase the memory size that can be consumed by the JVM.  This can be done by adding the following Environment Variable:
SONAR_RUNNER_OPTS=”-Xmx3062m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=128m”
e.g Linux
> export SONAR_SCANNER_OPTS=”-Xmx3062m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=128m”
e.g Windows
> set SONAR_SCANNER_OPTS=”-Xmx3062m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=128m”

 

Reference

You must be logged in to post a comment.

© Tutorials
CyberChimps