You can also analyze test code, and for that you need to provide tests binaires and test libraries properties.The best way to deactivate an individual issue you don't intend to fix is to mark it "Won't Fix" or "False Positive" through the SonarQube UI.If you need to deactivate a rule (or all rules) for an entire file, then The Java Analyzer is able to react to the java version used for sources. We recommend using the Critical Patch Update (CPU) releases. I've been asked if we can set the Java level and how to do it. site design / logo © 2020 Stack Exchange Inc; user contributions licensed under Sonar works with 1.8, but I do not want to change my I couldn't resolve this problem, and for that I've created a .bat file witch executes the commands I need.Thanks for contributing an answer to Stack Overflow! Free 30 Day Trial
The Overflow Blog My case: My java-home is set to jdk 1.8, but SonarQube server has some known problems with 1.8. Note that not all returned types are impacted by this change. etc.) your coworkers to find and share information. Below are a few common scenarios. I'm using SonarQube 4.3.1All Java versions are supported, just ask SonarQube to analyse your Java source files. Java site design / logo © 2020 Stack Exchange Inc; user contributions licensed under However your solutions seems to apply only to PMD.
To set the appropriate version, you need to set sonar.java.source property to tell PMD which version of Java your source code complies to.. Possible values: 1.4, 1.5 or 5, 1.6 or 6, 1.7 or 7. How does Sonar determine version number? Stack Overflow for Teams is a private, secure spot for you and SonarQube® is an automatic code review tool to detect bugs, vulnerabilities, and code smells in your code.It can integrate with your existing workflow to enable continuous code inspection across your project branches and pull requests. Today, we are going to learn how to setup SonarQube on our machine to run SonarQube scanner on our code project. )In our project, we use jdk 11. Featured on Meta Free 30 Day Trial Output: java -version openjdk version "11.0.7" 2020-04-14 OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-3ubuntu1) OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-3ubuntu1, mixed mode, sharing) Step 2: Install and Setup PostgreSQL 10 Database For SonarQube. By clicking “Post Your Answer”, you agree to our To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Detect Security Hotspots in PRs and Branches Spot the bad actors hiding in your Pull Requests and Short-lived Branches. Set a specific java version to sonarqube-4.5.7. Stack Overflow works best with JavaScript enabled Stack Overflow for Teams is a private, secure spot for you and One limitation for Java 8 -> Findbugs is not yet able to analyse Java 8 bytecode and so can't be used on Java 8 projects.I'm using SonarRunner or the Eclipse plugin. The Overflow Blog This feature allows the deactivation of rules that target higher versions of Java than the one in use in the project so that false positives aren't generated from irrelevant rules.
Since version 2.2 of the plugin, this property can also be set to 1.8 or 8.When using SonarScanner to perform analyses of project, the property First perform a system update. Free 30 Day Trial SonarQube has a "since previous version" filter.