Start FreeLog in
SonarCloud | Advanced setup | Languages | RPG

RPG

On this page

This language is available only in the Enterprise plan.

Language specific properties

Discover and update the RPG-specific properties in Administration > General Settings > Languages > RPG

Source code extraction

In order to analyze your source code with SonarCloud you need to first extract it onto a file system. You can use your own tool or an open-source tool; SonarSource does not provide any connectors or source code extraction tools.

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 (when "fully free-form" is not used). 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 a 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 Support

Free-form is supported for all kinds of specifications and SQL statements that exist in IBM i 7.4. Fully free-form code (starting with **FREE) is also supported.


Was this page helpful?

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARLINT, SONARQUBE, SONARCLOUD, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License