Skip to content

Latest commit

 

History

History
34 lines (20 loc) · 1.42 KB

prefer-pragmas-to-pseudo-comments.md

File metadata and controls

34 lines (20 loc) · 1.42 KB

code pal for ABAP > Documentation > Prefer Pragmas to Pseudo Comments

Prefer Pragmas to Pseudo Comments

What is the intent of the check?

In cases where pragmas are possible (i.e. for findings from the ABAP syntax check and from the Extended Program Check (SLIN)), they should be preferred over pseudo comments as they are more precise with respect to the statement they refer to since they are placed inside of the statement instead of after it.

How to solve the issue?

Change the "#EC of the pseudo comment to ## and move the new pragma inside of the statement it refers to if the pseudo comment was placed after the terminating period.

What to do in case of exception?

This check has no associated pseudo comment or pragma because pseudo comments can only refer to statements, not to other comments.

Example

Before the check:

  DATA a TYPE string. "#EC NEEDED

After the check:

  DATA a TYPE string ##NEEDED.

Further Readings & Knowledge