Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Analyzing ICE with SonarQube"

Line 1: Line 1:
After completing the steps in the [[ICE Build Instructions]], an additional Maven build may be executed to analyze the quality of the ICE source code using SonarQube. This build may be executed in Eclipse or on the command line.
+
After completing the steps in the [[ICE Build Instructions]], an additional Maven build may be executed to analyze the quality of the ICE source code using SonarQube. The development team recommends that the build be executed in Eclipse.
  
=== Inside Eclipse ===
+
== Creating the Run Configuration ==
To create a custom run configuration to analyze the full source code with SonarQube, select Run > Run Configurations from the menu bar. Select Maven Build from the list on the left side of the dialog, and click the New launch configuration near the top of the list. Provide a name for the new configuration. Set the base directory by clicking Browse Workspace… and selecting org.eclipse.ice.build. Set the goal to sonar:sonar. Click Apply and then Run.
+
To create a custom run configuration to analyze all of the ICE source code, select ''Run > Run Configurations...'' from the menu bar. Alternatively, expand the org.eclipse.ice.build bundle in the Package Explorer, right-click on the <tt>pom.xml</tt> file, and select ''Run As > Run Configurations...'' from the context menu. In the ''Run Configurations'' dialog that appears, select ''Maven Build'' from the list on the left, and click the ''New launch configuration;' button near the top of this pane. Provide a name for the new configuration. Set the base directory by clicking ''Browse Workspace...''. Select org.eclipse.ice.build from the list in the dialog that appears and click ''Ok''. In the ''Goals:'' text field, enter sonar:sonar. Next to the parameter table in the dialog, click ''Add...''. The dialog that appears allows you to set the names and values of parameters that appear in the <tt>pom.xml</tt> file. Unfortunately, we cannot widely distribute the values for these parameters, but if you need them, please send a request to <code>eclipse.ice.project <at> gmail.com</code>. After entering the parameters in the table, click ''Apply'' and then click ''Run''.
 
+
=== On the Command Line ===
+
  
 
== Install SonarQube for Eclipse ==
 
== Install SonarQube for Eclipse ==

Revision as of 15:17, 2 July 2015

After completing the steps in the ICE Build Instructions, an additional Maven build may be executed to analyze the quality of the ICE source code using SonarQube. The development team recommends that the build be executed in Eclipse.

Creating the Run Configuration

To create a custom run configuration to analyze all of the ICE source code, select Run > Run Configurations... from the menu bar. Alternatively, expand the org.eclipse.ice.build bundle in the Package Explorer, right-click on the pom.xml file, and select Run As > Run Configurations... from the context menu. In the Run Configurations dialog that appears, select Maven Build from the list on the left, and click the New launch configuration;' button near the top of this pane. Provide a name for the new configuration. Set the base directory by clicking Browse Workspace.... Select org.eclipse.ice.build from the list in the dialog that appears and click Ok. In the Goals: text field, enter sonar:sonar. Next to the parameter table in the dialog, click Add.... The dialog that appears allows you to set the names and values of parameters that appear in the pom.xml file. Unfortunately, we cannot widely distribute the values for these parameters, but if you need them, please send a request to eclipse.ice.project <at> gmail.com. After entering the parameters in the table, click Apply and then click Run.

Install SonarQube for Eclipse

Optionally, the SonarQube for Eclipse software may be installed in your workspace in order to view analysis results directly in Eclipse. This software may be installed using the Eclipse Marketplace or via Help > Install New Software… using the following site:

http://downloads.sonarsource.com/eclipse/eclipse/

The SonarQube C/C++ and Python Analyzers may be excluded for analyzing ICE’s source code, but the Java Analyzer and m2e Connector are required.

Back to the top