Could not retrieve http://update.sonarsource.org/plugins/rpg-confluence-include.html - Page not found.
Enables the SonarRPG analyzer.
First Analysis of a RPG Project
- Install SonarQube Server (see Setup and Upgrade for more details)
- Install SonarQube Scanner and be sure your can call sonar-scanner from the directory where you have your source code
- Install SonarRPG (see Installing a Plugin for more details)
Run your analysis with the SonarQube Scanner by executing the following command from the root directory of the project:
- Follow the link provided at the end of the analysis to browse your project's quality in SonarQube UI
Assuming steps 1-3 above have already been completed, you'll want to encapsulate your analysis parameters in a sonar-project.properties file at the root of your project (see a sample project on GitHub: https://github.com/SonarSource/sonar-scanning-examples/tree/master/sonarqube-scanner). Then subsequent analyses can simply be run with:
RPG Source Format
Depending on your extraction process, your RPG source files may include an extra margin on the left of the 80 columns used for code. This margin is in addition to the standard margin which takes up characters 1-5 in the 80-character source format. The extra margin is controlled through the
sonar.rpg.leftMarginWidth property. By default, it is set to 12, which is the size of the margin in an IBM “source physical file”. If your RPG source files do not contain such margin, you should set
sonar.rpg.leftMarginWidth to 0.
You can find an example file illustrating a 12-character margin in our sample project.
You should also make sure to set
sonar.sourceEncoding to the appropriate encoding. Please check the documentation of this property.
Free-form is supported for C-specs and SQL statements. Free-form is not yet supported for H, F, D and P specs (which were added in IBM i 7.2).