Skip to content

pethers/sonar-jdepend-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JDepend plugin for SonarQube Build Status Quality Gate

Requires SonarQube 5.6+ (tested against 5.6, 5.6.3 (LTS), 6.0 and 6.1)

Uses the JDepend libraries (http://clarkware.com/software/JDepend.html version 2.9.1) to add the following rules and metrics to SonarQube:

  • Number of Classes and Interfaces (Rule and Metric)
  • Afferent Couplings (Rule and Metric)
  • Efferent Couplings (Rule and Metric)
  • Abstractness (Rule only)
  • Instability (Rule only)
  • Distance from the Main Sequence (Rule only)
  • Package Dependency Cycle (Rule and Metric)

This plugin depends on the existence of a package-info.java file in the package to correctly display issues (if no package-info.java file is present, the issues cannot be registered, as SonarQube only allows issues on existing files).

Missing package-info.java files can be detected and enforced with the following metrics:

  • Number of Packages (Metric)
  • Number of missing package-info.java files (Metric)

Configuration

The plugin executes the Jdepend library (packaged within the plugin) during the execution of the SonarQube scanner to scan the binaries, so no extra configuration is needed within the project. The sensor will not be executed if no Jdepend rules have been activated.

Known issues

The used JDepend library does not parse the constant pool completely for Java 8. It will display an error for 'invoked dynamic' call (Unknown constant: 18). This will be fixed in version 1.1

About

Sonar plugin for jDepend

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%