org.sonar.l10n.oe.rules.rssw-oe.compiler.warning.4958.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-openedge-plugin Show documentation
Show all versions of sonar-openedge-plugin Show documentation
Enables analysis of OpenEdge projects
The newest version!
This rule raises an issue whenever an IMPORT UNFORMATTED
statement references more than one field.
The UNFORMATTED
phrase of the IMPORT
statement implies that all data on the input line should be read into the first field in the IMPORT
statement without regard to delimiters in the data.
Your code has multiple fields listed in the IMPORT
statement; subsequent fields will not be used in the IMPORT
statement at runtime.
Noncompliant Code Example
DEFINE VARIABLE x1 AS CHARACTER NO-UNDO.
DEFINE VARIABLE x2 AS CHARACTER NO-UNDO.
IMPORT UNFORMATTED x1 x2. // x2 will always be empty
Compliant Solution
DEFINE VARIABLE x1 AS CHARACTER NO-UNDO.
DEFINE VARIABLE x2 AS CHARACTER NO-UNDO.
IMPORT UNFORMATTED x1.