Skip to content

Using the plug in

Sheikh Araf edited this page Aug 18, 2016 · 1 revision

This page will explain how to use the coala Eclipse plug-in to analyze your code using the coala code analysis framework. If you haven't installed the plug-in the instructions for doing that can be found in the README.

The plug-in requires the coala binaries to be present on your system. If you haven't already installed coala you can read the installation instructions here.

There are two ways in which you can run coala from the Eclipse plug-in:

  • Using a coafile.
  • Manually selecting a bear to run analysis with.

Running coala using a coafile

  1. Fire up Eclipse and open a file that you want to run the analysis on.

  2. Make sure you have configured the coafile. Learn more about that here.

  3. Click the coala button on the tool-bar.

  4. The plug-in will then run the analysis and display the results in the Problems pane.

Running coala by manually selecting the bear of your choice

  1. Fire up Eclipse and open a file that you want to run the analysis on.

  2. Right click anywhere inside the editor window to open the context menu.

  3. In the Run coala with push menu, select the the bear you wish to run.

  4. The plug-in will then run the analysis and display the results in the Problems pane.

Fixing issues returned after analysis

  1. After the analysis is complete and the issues are visible in the Problems pane, right-click an issue and select the Quick Fix option (Ctrl +1 keyboard shortcut).

  2. In the Quick Fix dialog select the fix that you want to apply and click Finish.

  3. The issue will be fixed and no longer visible in the Problems pane.