Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Legend

2021-08-XX v.1.16.0
------------------
* Skip 'Prefer RETURNING to EXPORTING' when both exist (#490)
* Pseudo Comment Usage: Multiple Inline Entries (#494)
* Prefer Pragmas to Pseudo Comments: Multiple Pseudo Comments (#489)
* Y_CHECK_MESSAGE_EASY_TO_FIND dump (#492)
Expand Down
1 change: 1 addition & 0 deletions src/checks/y_check_prefer_returning.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ CLASS y_check_prefer_returning IMPLEMENTATION.
OR <token>-str = 'RETURNING'
OR <token>-str = 'RAISING'.
skip = abap_true.
CLEAR count.
ELSEIF <token>-str = 'EXPORTING'.
skip = abap_false.
ENDIF.
Expand Down
32 changes: 32 additions & 0 deletions src/checks/y_check_prefer_returning.clas.testclasses.abap
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,35 @@ CLASS ltc_standard_table IMPLEMENTATION.
ENDMETHOD.

ENDCLASS.



CLASS ltc_export_and_returning DEFINITION INHERITING FROM ltc_one_exporting FOR TESTING RISK LEVEL HARMLESS DURATION SHORT.
PROTECTED SECTION.
METHODS get_code_without_issue REDEFINITION.
ENDCLASS.

CLASS ltc_export_and_returning IMPLEMENTATION.

METHOD get_code_without_issue.
result = VALUE #(
( 'REPORT y_example. ' )

( ' START-OF-SELECTION. ' )
( ' CLASS example DEFINITION. ' )
( ' PUBLIC SECTION. ' )
( ' METHODS run ' )
( ' EXPORTING ' )
( ' !error TYPE char1 ' )
( ' RETURNING ' )
( ' VALUE(result) TYPE string_table. "#EC NUM_OUTPUT_PARA ' )
( ' ENDCLASS. ' )

( ' CLASS example IMPLEMENTATION. ' )
( ' METHOD run. ' )
( ' ENDMETHOD. ' )
( ' ENDCLASS. ' )
).
ENDMETHOD.

ENDCLASS.