Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 1.56 KB

SpaceAroundCommentSignRule.md

File metadata and controls

59 lines (39 loc) · 1.56 KB

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

Put spaces around " comment sign

Ensures that there is at least one space before and after the " comment sign.

Options

  • Separate code and " comment with a space
  • Start " comment with space

Examples

  METHOD space_around_comment_sign.
    "Comment signs
    "are NOT the same as "quotation marks",
    "so it looks much better
    "to put a space between the " and the text.

    CLEAR ev_result.  "the same is true at line end

    lv_value = 0."comment

    ls_pair = VALUE #(" initial comment
                       a = '3.1415'" pi
                       b = '1.4142'" sqrt(2)
                      )."final comment
  ENDMETHOD.

Resulting code:

  METHOD space_around_comment_sign.
    " Comment signs
    " are NOT the same as "quotation marks",
    " so it looks much better
    " to put a space between the " and the text.

    CLEAR ev_result.  " the same is true at line end

    lv_value = 0. " comment

    ls_pair = VALUE #( " initial comment
                       a = '3.1415' " pi
                       b = '1.4142' " sqrt(2)
                      ). " final comment
  ENDMETHOD.

Related code