How to use FindBugs plugin in Eclipse

FindBugs is a popular tool that is used to find bugs in Java source code. It uses static code analysis to find bugs. It is available as a plugin for Eclipse.

  • Install: To install this plugin, go to Help -> Install New Software, add the URL http://findbugs.cs.umd.edu/eclipse

  • The configuration options of this plugin can be found in Window -> Preferences -> Java -> FindBugs.

  • Filter files can be added to include or exclude classes or methods from these checks. This can be done in the above dialog too.

  • The same configuration can be done on a per-project level. Right-click on the project and choose Properties -> FindBugs. Choose the Enable project specific settings option.

  • To check the files of a project for bugs, right-click on the project and choose Properties -> Find Bugs -> Find Bugs.

Tried with: FindBugs 3.0.0, Eclipse 4.4.1 (Luna) and Ubuntu 14.04

Advertisements

One thought on “How to use FindBugs plugin in Eclipse”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s