rspec/rules/S1120/abap/rule.adoc

36 lines
682 B
Plaintext
Raw Normal View History

2020-06-30 12:47:33 +02:00
include::../description.adoc[]
== Noncompliant Code Example
With an indent size of 2:
2020-06-30 12:47:33 +02:00
----
CLASS counter IMPLEMENTATION.
METHOD set.
count = set_value. " Noncompliant, expected to start at column 4
ENDMETHOD. " Noncompliant, expected to start at column 2
METHOD increment.
ADD 1 TO count.
ENDMETHOD.
METHOD get.
get_value = count.
ENDMETHOD. " Noncompliant, expected to start at column 2
ENDCLASS.
----
== Compliant Solution
----
CLASS counter IMPLEMENTATION.
METHOD set.
count = set_value.
ENDMETHOD.
METHOD increment.
ADD 1 TO count.
ENDMETHOD.
METHOD get.
get_value = count.
ENDMETHOD.
ENDCLASS.
----