{"id":680,"date":"2017-07-28T19:15:16","date_gmt":"2017-07-28T19:15:16","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2017\/07\/28\/sonarqube-frequently-asked-questions-faq\/"},"modified":"2021-11-18T10:22:27","modified_gmt":"2021-11-18T10:22:27","slug":"sonarqube-frequently-asked-questions-faq","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/sonarqube-frequently-asked-questions-faq\/","title":{"rendered":"SonarQube Frequently asked questions (FAQ) |  SonarQube FAQs"},"content":{"rendered":"<h3><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2832 aligncenter\" src=\"http:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2017\/07\/sonarqube-faqs.png\" alt=\"sonarqube-faqs\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2017\/07\/sonarqube-faqs.png 600w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2017\/07\/sonarqube-faqs-300x200.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/h3>\n<h3><\/h3>\n<p>&nbsp;<\/p>\n<h3>SonarQube Frequently asked questions (FAQ)<\/h3>\n<div><\/div>\n<div><strong>Is SonarQube Replacement for Checkstyle, PMD, FindBugs?<\/strong><\/div>\n<div><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/strong><\/div>\n<div>\n<p>Answers &#8211; YES and NO<\/p>\n<\/div>\n<div><\/div>\n<div>Why Yes?<\/div>\n<div>Sonar will run CheckStyle, FindBugs and PMD, as well as a few other &#8220;plugins&#8221; 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.<\/div>\n<div><\/div>\n<div>Why No?<\/div>\n<div>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&#8217;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.<\/div>\n<div><\/div>\n<p>&nbsp;<\/p>\n<div><strong>What is the SonarQube Plugins available which can be integrated with Eclipse, IntelliJ IDEA, Visual Studio, Visual Studio Code, and Atom?<\/strong><\/div>\n<div><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/strong><\/div>\n<div>Answer &#8211;<\/div>\n<div>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.<\/div>\n<div>Reference<\/div>\n<div><a href=\"http:\/\/www.sonarlint.org\/index.html\" target=\"_blank\" rel=\"noopener\">http:\/\/www.sonarlint.org\/index.html<\/a><\/div>\n<div><\/div>\n<p>&nbsp;<\/p>\n<div><strong>Where i can get the Support related to SonarQube?<\/strong><\/div>\n<div><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/strong><\/div>\n<div>Google Grops<\/div>\n<div><a href=\"https:\/\/groups.google.com\/forum\/#!forum\/sonarqube\" target=\"_blank\" rel=\"noopener\">https:\/\/groups.google.com\/forum\/#!forum\/sonarqube<\/a><\/div>\n<div><\/div>\n<div>Facebook Groups<\/div>\n<div><a href=\"https:\/\/www.facebook.com\/groups\/devopsindia\" target=\"_blank\" rel=\"noopener\">https:\/\/www.facebook.com\/groups\/devopsindia<\/a><\/div>\n<div><\/div>\n<div>Linkedin Groups<\/div>\n<div><a href=\"https:\/\/www.linkedin.com\/groups\/6727934\" target=\"_blank\" rel=\"noopener\">https:\/\/www.linkedin.com\/groups\/6727934<\/a><\/div>\n<div><\/div>\n<div>Public Forum<\/div>\n<div><a href=\"https:\/\/stackoverflow.com\/questions\/tagged\/sonarqube\" target=\"_blank\" rel=\"noopener\">https:\/\/stackoverflow.com\/questions\/tagged\/sonarqube<\/a><\/div>\n<div><\/div>\n<p>&nbsp;<\/p>\n<div><strong>Top 10 Lessons Learned from 2 Years Work with Codehaus Sonar<\/strong><\/div>\n<div><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/strong><\/div>\n<div><a href=\"http:\/\/www.sw-engineering-candies.com\/blog-1\/top-10-lessons-learned-from-2-years-work-with-codehaus-sonar-open-source-quality-management-platform\" target=\"_blank\" rel=\"noopener\">http:\/\/www.sw-engineering-candies.com\/blog-1\/top-10-lessons-learned-from-2-years-work-with-codehaus-sonar-open-source-quality-management-platform<\/a><\/div>\n<div><\/div>\n<div><\/div>\n<p>&nbsp;<\/p>\n<div><strong>Configure Sonar to exclude files from Maven pom.xml<\/strong><\/div>\n<div><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br>\n<img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-679\" src=\"http:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2017\/07\/Configure-SonarQube-to-excl.jpg\" alt=\"\" width=\"836\" height=\"600\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2017\/07\/Configure-SonarQube-to-excl.jpg 836w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2017\/07\/Configure-SonarQube-to-excl-300x215.jpg 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2017\/07\/Configure-SonarQube-to-excl-768x551.jpg 768w\" sizes=\"auto, (max-width: 836px) 100vw, 836px\" \/><br>\n<\/strong><\/div>\n<div><a href=\"http:\/\/docs.sonarqube.org\/display\/SONAR\/Narrowing+the+Focus#NarrowingtheFocus-IgnoreFiles\" target=\"_blank\" rel=\"noopener\">http:\/\/docs.sonarqube.org\/display\/SONAR\/Narrowing+the+Focus#NarrowingtheFocus-IgnoreFiles<\/a><\/div>\n<div><a href=\"https:\/\/docs.sonarqube.org\/display\/SONAR\/Analysis+Parameters#AnalysisParameters-Exclusions\/Inclusions\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.sonarqube.org\/display\/SONAR\/Analysis+Parameters#AnalysisParameters-Exclusions\/Inclusions<\/a><\/div>\n<div><a href=\"https:\/\/docs.sonarqube.org\/display\/SONAR\/Narrowing+the+Focus#NarrowingtheFocus-IgnoreCodeCoverage\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.sonarqube.org\/display\/SONAR\/Narrowing+the+Focus#NarrowingtheFocus-IgnoreCodeCoverage<\/a><\/div>\n<div><a href=\"https:\/\/docs.sonarqube.org\/display\/SONAR\/Analysis+Parameters#AnalysisParameters-Exclusions\/Inclusions\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.sonarqube.org\/display\/SONAR\/Analysis+Parameters#AnalysisParameters-Exclusions\/Inclusions<\/a><\/div>\n<div><a href=\"https:\/\/docs.sonarqube.org\/display\/SCAN\/Analyzing+with+SonarQube+Scanner+for+Maven#AnalyzingwithSonarQubeScannerforMaven-ExcludingamodulefromSonarQubeanalysis\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.sonarqube.org\/display\/SCAN\/Analyzing+with+SonarQube+Scanner+for+Maven#AnalyzingwithSonarQubeScannerforMaven-ExcludingamodulefromSonarQubeanalysis<\/a><\/div>\n<div><\/div>\n<p>&nbsp;<\/p>\n<div><strong>Does Sonar support multiple language in same project ex. sonar.language=java,grvy?<\/strong><\/div>\n<div><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/strong><\/div>\n<div>Starting with SonarQube 4.2, multi-language projects are supported.<\/div>\n<div><\/div>\n<div>This automatically happens when sonar.language is not set.<\/div>\n<div>See sample project here: <a href=\"https:\/\/github.com\/bellingard\/multi-language-project\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/bellingard\/multi-language-project<\/a><\/div>\n<div><\/div>\n<div><\/div>\n<p>&nbsp;<\/p>\n<div><strong>How to exclude the directory in SonarQube?<\/strong><\/div>\n<div><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/strong><\/div>\n<div>try something like this:<\/div>\n<div>sonar.exclusions=src\/java\/test\/**<\/div>\n<div>\n<p>sonar.exclusions=system\/**, test\/**, application\/third_party\/**, application\/logs\/**<\/p>\n<div><strong>How to Increase SonarQube Heap Size?<\/strong><\/div>\n<div><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/strong><\/div>\n<div>Whenever you get a issues like &#8220;SonarQube analysis failed java.lang.OutOfMemoryError: Java heap space&#8221;, you may following options to follow.<\/div>\n<div><\/div>\n<div>Option 1 &#8211; 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.<\/div>\n<div><\/div>\n<div>Option 2 \u2013 Increase the memory size that can be consumed by the JVM. &nbsp;This can be done by adding the following Environment Variable:<\/div>\n<div>SONAR_RUNNER_OPTS=&#8221;-Xmx3062m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=128m&#8221;<\/div>\n<div><\/div>\n<div>e.g Linux<\/div>\n<div>&gt; export SONAR_SCANNER_OPTS=&#8221;-Xmx3062m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=128m&#8221;<\/div>\n<div>e.g Windows<\/div>\n<div>&gt; set SONAR_SCANNER_OPTS=&#8221;-Xmx3062m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=128m&#8221;<\/div>\n<div><\/div>\n<p>&nbsp;<\/p>\n<div>Reference<\/div>\n<div><a href=\"https:\/\/docs.sonarqube.org\/display\/SONAR\/Hardware+Recommendations\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.sonarqube.org\/display\/SONAR\/Hardware+Recommendations<\/a><\/div>\n<div><a href=\"https:\/\/docs.sonarqube.org\/display\/SCAN\/Analyzing+with+SonarQube+Scanner\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.sonarqube.org\/display\/SCAN\/Analyzing+with+SonarQube+Scanner<\/a><\/div>\n<\/div>\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_38484\"><iframe loading=\"lazy\"  id=\"_ytid_17202\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_38484\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<h3>SonarQube Frequently asked questions (FAQ)<\/h3>\n<div>\u00a0<\/div>\n<div><strong>Is SonarQube Replacement for Checkstyle, PMD, FindBugs?<\/strong><\/div>\n<div><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/strong><\/div>\n<div>Answers &#8211; YES and NO<\/p>\n","protected":false},"author":1,"featured_media":2832,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[158],"tags":[622,621,581,623,625,624],"class_list":["post-680","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sonarqube","tag-faqs","tag-frequently-asked-questions","tag-sonarqube","tag-sonarqube-faqs","tag-sonarqube-question-and-answers","tag-sonarqube-questions"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=680"}],"version-history":[{"count":8,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/680\/revisions"}],"predecessor-version":[{"id":25750,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/680\/revisions\/25750"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/2832"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}