Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description / Feature

To check code against rules provided by FindBugs.

Sonar FindBugs Plugin

1.1

FindBugs

2.0.1

Installation

  1. Install the FindBugs plugin through the Update Center (since Sonar 3.5) or download it into the SONAR_HOME/extensions/plugins directory from the Java Ecosystem page
  2. Restart the Sonar server
Wiki Markup
{iframe:src=http://update.sonarsource.org/plugins/findbugs-confluence.html|width=700|height=500|frameborder=0}
Your browser does not support iframes.
{iframe}

 

Description / Feature

It requires the Java Plugin, and uses FindBugs and fb-contrib to provide coding rules.

Version 3.0 of the plugin embed findbugs 3.0.0 which supports analysis of Java 8 bytecode but requires Java 1.7 to run (see Compatibility section)

Usage

In the quality profile, activate some rules from the FindBugs or fb-contrib rule repositories and run a Sonar an analysis on your project.

Note
titleCompiled code

 FindBugs FindBugs requires the compiled classes to run.

Make sure that you compile your source code with debug information on (to get the line numbers in the Java bytecode). It Debug is usually turned on by default (except for compilation with Ant). Otherwise the violations unless you're compiling with Ant, in which case, you will need to turn it on explicitly. If the debug information is not available, the issues raised by FindBugs will be displayed at the beginning of the file as because the correct line numbers will be missing.were not available.

Compatibility 

Version 3.0.0 of findbugs requires java 1.7 to run. Please find below the compatibility matrix of the plugin.

Findbugs Plugin Version

Embedded Findbugs VersionMinimal Java version Required
2.42.0.31.6
3.03.0.01.7