Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 71 Next »

NameJava Ecosystem
Latest version1.5 ( 28 october 2013 )
Requires SonarQube version3.6 or higher ( check version compatibility )
DownloadJavaEcosystem-1.5.zip
LicenseGNU LGPL 3
DevelopersSonarSource
Issue trackerhttp://jira.codehaus.org/browse/SONARJAVA
Sourceshttps://github.com/SonarSource/sonar-java

Live example

Icon

If you want to see a live example of the capabilities of the Java Ecosystem, you can have a look at SonarQube on SonarQube.

Description / Features

The Java Ecosystem is a set of plugins used to monitor the quality of Java projects within SonarQube. The following plugins are included:

Other optional plugins are available for download: AndroidCobertura, EmmaCloverClirr and fb-contrib.

The Java Ecosystem is compatible with the SonarQube Eclipse plugin for tracking issues while coding. It is also compatible with the Issues Report plugin to run pre-commit local analysis.

Installation

By default the Java Ecosystem is provided with SonarQube. You can update it from the Update Center or download the latest release from this page header.

Usage

Run a SonarQube Analysis

To run an analysis of your Java project, you can use the following analyzers:

Sample projects for each analyzer are available on GitHub that can be browsed or downloaded: /projects/languages/java

Notes:

  • The source directory must be set to the directory containing the top parent package. For example, if your directory structure is 'src/main/java/com/mycompany/...', the source directory must be set to 'src/main/java'.
  • The source directory tree must match the package declaration. For example, the following class:
MyClass.java

must be located in the following directory: [mySourceDirectory]/com/mycompany/mypackage/MyClass.java. Otherwise you would get an error like this while running your analysis:

Log

Tests and Code Coverage

The default code coverage engine for unit tests can be set in Settings > General Settings > Java > Code coverage plugin property.

By default the code coverage engine is JaCoCo, but CoberturaEmma or Clover can also be used.

To deal with unit tests and code coverage, see Code Coverage by Unit Tests for Java Project tutorial.

To deal with integration tests and code coverage, see Code Coverage by Integration Tests for Java Project tutorial.

To Go Further

Change Log

Version 1.5

Loading
Summary Key Priority Type
Rule "Constant names should comply with a naming convention" should not generate false-positives for "serialVersionUID" SONARJAVA-367 Major Bug
The default SQALE cost to cover one line or branch of code is respectively 10 minutes and 30 minutes which is definitely too big SONARJAVA-363 Major Improvement
Rule "Java Collection Implementations should never be used directly (except during instantiation phase)" SONARJAVA-361 Major New Feature
Rule "Nullability should never be tested with "Object.equals(...)" method" SONARJAVA-360 Major New Feature
Rule "CHECKSTYLE:OFF/ON suppression comment filters should not be used" SONARJAVA-355 Major New Feature
The rule "Public types, methods and fields (API) should be documented with Javadoc" badly support parameterized methods SONARJAVA-353 Major Improvement
Rule "Exception classes should be immutable" should log issue both when class name ends with Exception OR Error SONARJAVA-352 Major Improvement
Rule "Method or catch-block input parameters should never be reassigned" SONARJAVA-349 Major New Feature
Updates rule "Avoid deeply nested if statements" to also take into account "for", "while" and "switch" statements SONARJAVA-345 Major New Feature
Rule "Octal values should not be used" SONARJAVA-344 Major New Feature
Rule "IP addresses should never be hardcoded into the source code" SONARJAVA-343 Major New Feature
Rule "Loggers should be "private static final" and should share a naming convention" SONARJAVA-342 Major New Feature
Rule "NOPMD suppression comment filter should not be used" SONARJAVA-340 Major New Feature
Rule improvement: NPE on S1186 EmptyMethodsCheck when an interface contains class instantiation SONARJAVA-338 Major Bug
Update description of rule "Dodgy - Possible null pointer dereference due to return value of called method" SONARJAVA-337 Trivial Improvement
Rule: "switch" statements should have at least 3 branches SONARJAVA-335 Major New Feature
Extends the rule "System.exit(...) should not be called" to also ban usage of "Runtime.getRuntime.exit()" SONARJAVA-332 Major Improvement
S1160 ThrowsSeveralCheckedExceptionCheck should not log issues on methods implementing an interface and throwing several checked exceptions SONARJAVA-329 Major Bug
Typo in "Avoid cycle between java packages" rule description SONARJAVA-328 Trivial Bug
Depreciate the PMD rule 'Default Package' SONARJAVA-327 Minor Improvement
Showing 20 out of 36 issues Refresh

 

Loading

Version 1.4 (105 issues)

Showing 20 out of 105 issues Refresh

 

Loading

Version 1.3 (43 issues)

Type Key Summary Priority
Bug SONARJAVA-165 "Undocumented API" detects private attributes as public Critical
Bug SONARJAVA-29 "Avoid Throwing Raw Exception Types" Rule not able to detect "throw new Exception" in all cases Major
Bug SONARJAVA-135 The rule "Unused private method" generates some false-positives in case of method overloading Major
New Feature SONARJAVA-133 Compute the new metric "complexity in methods" Major
New Feature SONARJAVA-128 Rule S00108: Nested blocks of code should not be left empty Major
New Feature SONARJAVA-127 Rule S00107: Methods should not have too many parameters Major
New Feature SONARJAVA-125 Rule S00112: Generic exceptions Error, RuntimeException, Throwable and Exception should never be thrown Major
New Feature SONARJAVA-122 Rule S00105: Tabulation characters should not be used Major
New Feature SONARJAVA-121 Rule S00104: Files should not have too many lines of code Major
New Feature SONARJAVA-119 Rule S00101: Class names should comply with a naming convention Major
New Feature SONARJAVA-118 Rule S00100: Method names should comply with a naming convention Major
New Feature SONARJAVA-120 Rule S00103: Lines of code should not be too long Major
Improvement SONARJAVA-166 Reorganize the properties of every Java plugin using sub-categories Major
Bug SONARJAVA-164 The Sonar JaCoCo plugin takes into account only the first binary directories if several ones are provided Major
Bug SONARJAVA-161 XPath rule should not lead to NPE, when parse error happens Major
Improvement SONARJAVA-105 The cardinality of JaCoCo properties "includes", "excludes" and "exclclassloader" should be multiple Major
Improvement SONARJAVA-154 Use the new Sonar API to highlight any symbol use or declaration in java source code Major
Improvement SONARJAVA-153 Use the Sonar Syntax Highlighting API to colorize java source code Major
New Feature SONARJAVA-152 Deprecate PMD rule AvoidDollarSigns in favor of S00114 - S00117 Major
New Feature SONARJAVA-151 Rule S00122: Statements should be on separate lines Major
Showing 20 out of 43 issues Refresh

 

Loading

Version 1.2 (16 issues)

 

Loading

Version 1.1 (15 issues)

 

  • No labels