Skip to content

Latest commit

 

History

History
62 lines (43 loc) · 2.04 KB

ClosingBracketsPositionRule.md

File metadata and controls

62 lines (43 loc) · 2.04 KB

<-- previous rule | overview | next rule -->

Close brackets at line end

Closes brackets at line end by moving one or many ) ] . to the previous line.

This rule is part of the essential profile, as it is explicitly demanded by the Clean ABAP Styleguide.

References

Options

  • (no options available for this rule)

Examples

  METHOD close_brackets_at_line_end.
    ev_result = VALUE #( ( a = 1
                           b = 2
                         )
                         ( a = 2
                           b = 4 " comment
                         )
                       ).

    any_method( iv_name   = 'ABC'
                iv_amount = get_random( iv_min = lts_min[ id  = lv_item_id
                                                          var = lv_var
                                                        ]
                                        iv_max = 100
                                      )
              ).
  ENDMETHOD.

Resulting code:

  METHOD close_brackets_at_line_end.
    ev_result = VALUE #( ( a = 1
                           b = 2 )
                         ( a = 2
                           b = 4 ) ). " comment

    any_method( iv_name   = 'ABC'
                iv_amount = get_random( iv_min = lts_min[ id  = lv_item_id
                                                          var = lv_var ]
                                        iv_max = 100 ) ).
  ENDMETHOD.

Related code