luni, 16 martie 2015

Eclipse Luna - FindBugs install and simple configuration

1. Install FindBugs plugin


Under this section you will find all the install steps done to add the FindBugs plugin to your Eclipse Luna IDE.
Before starting the installation check for the newest repository link for the plugin. After a quick search on the FindBugs official site (http://findbugs.sourceforge.net/) you should find the repository link:
http://findbugs.cs.umd.edu/eclipse

1.1 Access "Install new software..." Eclipse view 


Click on the "Help" menu and select the "Install new software..." menu item.
This will lead you to the "Install" window.


1.2 Select the FindBugs repository

 

Press on the "Add..." button to open the "Add repository" dialog.
Fill the "Name" text box. Any non existing name can be introduced.
Fill the "Location" text box. Add the repository link from the official site:
                     http://findbugs.cs.umd.edu/eclipse
Press "OK" to finish adding the new FindBugs repository.

 

1.3 Select the plugin for install


After you finish adding the repository a new entry should be available.
Select the "FindBugs" check box and press the "Next" button to start the install.


 

1.4 Confirm installation for the selected sofware


The "Install Details" view will appear for you to see your current selections and confirm their install.
You will see details about your selected plugins: name, version and id.
To continue press "Next" button.


 

1.5 Review and confirm License agreement 


The "Review Licenses" view will appear.
Read the license and select the "I accept the terms and license agreement" to continue.
The "Finish" button becomes available.
After pressing the "Finish" button, the install will start.

 

1.6 Confirm security warning


A security warning will be displayed.
To continue the installation you will need to press the "OK" button.

 

1.7 Restart Eclipse


The restart prompt for Eclipse Luna will appear after the changes are done.
Press "Yes" button.
The plugin should be visible after the Eclipse is restarted.

 

2. Configuration


The plugin comes with a default configuration and can be used without further changes.
But you might want to make additional changes to the FindBugs plugin behavior.

 

2.1 Access Eclipse "Preferences" view


Click the "Window" menu and select the "Preferences" menu item.
The "Preferences" dialog will be opened.

 

2.2 Select FindBugs configuration view


Select the "FindBugs" entry from the tree to open it's configuration.
On the "Reporter Configuration" tab select the reported categories, level and marker type.
For example I add the "Malicious code vulnerability", "Security" and "Internationalization" categories to the plugin default selection.

 

2.3 Plugin settings


On the "Plugins and misc. Settings" you can change some of the plugin behavior.
It's a good idea to select the "Switch to FindBugs perspective after analysis" check box.

 

2.4 Rule configuration for FindBugs


On the "Detector configuration" tab you can select rules one by one.
But keep in mind that the selected rules won't be reported, if their category is not checked in the "Reporter Configuration" tab. These rules are greyed out.

Niciun comentariu:

Trimiteți un comentariu