Skip to content

Commit 7ef482d

Browse files
authored
Harmonize keyword case in "Avoid encodings" reasoning (#363)
match keyword case of file start and the rest of the styleguide
1 parent 6b5d52a commit 7ef482d

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

clean-abap/sub-sections/AvoidEncodings.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -122,52 +122,52 @@ While this practice was not correct in the first place, as an interface is somet
122122
Name the interface more generic and the implementing classes more specific:
123123

124124
```ABAP
125-
interface game_board.
125+
INTERFACE game_board.
126126
...
127-
endinterface.
127+
ENDINTERFACE.
128128
129-
class game_board_as_list definition.
130-
public section.
131-
interfaces game_board.
129+
CLASS game_board_as_list DEFINITION.
130+
PUBLIC SECTION.
131+
INTERFACES game_board.
132132
...
133-
endclass.
133+
ENDCLASS.
134134
135-
class game_board_as_array definition.
136-
public section.
137-
interfaces game_board.
135+
CLASS game_board_as_array DEFINITION.
136+
PUBLIC SECTION.
137+
INTERFACES game_board.
138138
...
139-
endclass.
139+
ENDCLASS.
140140
```
141141

142142
To avoid name clashes with method e.g. importing parameters use the self reference `me->`:
143143

144144
```ABAP
145-
class game_board_as_list definition.
146-
public section.
147-
methods constructor
148-
importing x_dimension type i
149-
y_dimension type i.
150-
private section.
151-
data x_dimension type i.
152-
data y_dimension type i.
153-
endclass.
154-
155-
class game_board_as_list implementation.
156-
method constructor.
145+
CLASS game_board_as_list DEFINITION.
146+
PUBLIC SECTION.
147+
METHODS constructor
148+
IMPORTING x_dimension TYPE i
149+
y_dimension TYPE i.
150+
PRIVATE SECTION.
151+
DATA x_dimension TYPE i.
152+
DATA y_dimension TYPE i.
153+
ENDCLASS.
154+
155+
CLASS game_board_as_list IMPLEMENTATION.
156+
METHOD constructor.
157157
me->x_dimension = x_dimension.
158158
me->y_dimension = y_dimension.
159-
endmethod.
160-
endclass.
159+
ENDMETHOD.
160+
ENDCLASS.
161161
```
162162

163163
For tables and structures use singular and plural:
164164

165165
```ABAP
166-
types: begin of coordinate,
167-
x type i,
168-
y type i,
169-
end of coordinate.
170-
type coordinates type standard table of coordinate with default key.
166+
TYPES: BEGIN OF coordinate,
167+
x TYPE i,
168+
y TYPE i,
169+
END OF coordinate.
170+
TYPE coordinates TYPE STANDARD TABLE OF coordinate WITH DEFAULT KEY.
171171
```
172172

173173
## Compromises

0 commit comments

Comments
 (0)