You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
newRuleReference(RuleSource.ABAP_STYLE_GUIDE, "Don't align type clauses", "#dont-align-type-clauses", true) };
@@ -220,6 +230,14 @@ public String getExample() {
220
230
+ LINE_SEP + " two VALUE 2,"
221
231
+ LINE_SEP + " three VALUE 3,"
222
232
+ LINE_SEP + " END OF ENUM number."
233
+
+ LINE_SEP + ""
234
+
+ LINE_SEP + " \" for readability, definitions of generic structures should not be part of a"
235
+
+ LINE_SEP + " \" TYPES: chain; with that, CONTAINING can even be moved before the type name"
236
+
+ LINE_SEP + " TYPES gen_struc TYPE ANY"
237
+
+ LINE_SEP + " STRUCTURE CONTAINING %cid_ref TYPE abp_behv_cid"
238
+
+ LINE_SEP + " %is_draft TYPE"
239
+
+ LINE_SEP + " abp_behv_flag other_struc TYPE"
240
+
+ LINE_SEP + " ANY STRUCTURE."
223
241
+ LINE_SEP
224
242
+ LINE_SEP + " \" if maximum line length is exceeded, VALUE clauses can be moved below TYPE or even below the name"
225
243
+ LINE_SEP + " CONSTANTS lc_any_constant_with_long_name TYPE if_any_interface=>ty_any_type VALUE if_any_interface=>co_any_value_with_long_name."
@@ -232,6 +250,7 @@ public String getExample() {
232
250
privatefinalString[] alignNonChainsActionTexts = newString[] { "align name, TYPE, LENGTH, VALUE etc. if filled", "align name and TYPE", "align name only (like Pretty Printer)" };
233
251
privatefinalString[] alignStructureActionTexts = newString[] { "align name, TYPE, LENGTH, VALUE etc. if filled", "align name and TYPE (like Pretty Printer)", "align name only" };
234
252
privatefinalString[] alignEnumActionTexts = newString[] { "align name and VALUE (like Pretty Printer)", "align name only" };
253
+
privatefinalString[] containingPositionTexts = newString[] { "keep as is", "continue after ANY STRUCTURE", "continue after ANY STRUCTURE, then break", "below TYPES keyword + 2", "below type name + 2", "below TYPE", "below ANY STRUCTURE" };
finalConfigEnumValue<AlignEnumAction> configAlignEnumAction = newConfigEnumValue<AlignEnumAction>(this, "AlignEnumAction", "Action for enums (BEGIN OF ENUM ...):", alignEnumActionTexts, AlignEnumAction.values(), AlignEnumAction.ALIGN_NAME_AND_VALUE, AlignEnumAction.ALIGN_NAME_ONLY, LocalDate.of(2023, 12, 30) );
264
+
finalConfigEnumValue<ContainingPosition> configContainingPosition = newConfigEnumValue<ContainingPosition>(this, "ContainingPosition", "Position of CONTAINING for generic structures:", containingPositionTexts, ContainingPosition.values(), ContainingPosition.BELOW_KEYWORD_PLUS_2, ContainingPosition.UNCHANGED, LocalDate.of(2026, 1, 15));
245
265
finalConfigIntValueconfigFillPercentageToJustifyOwnColumn = newConfigIntValue(this, "FillPercentageToJustifyOwnColumn", "Fill Ratio to justify own column", "%", 1, 20, 100);
246
266
finalConfigIntValueconfigMaxLineLength = newConfigIntValue(this, "MaxLineLength", "Maximum line length", "(only used to move VALUE clauses to the next line if required)", MIN_LINE_LENGTH_ABAP, HIGHER_DEFAULT_LINE_LENGTH_ABAP, 255, 200, LocalDate.of(2023, 7, 28));
// do not align table declarations with "WITH ... KEY ..." sections, because they usually should not be put on a single line;
654
-
// however, do accept the short cases of "WITH EMPTY KEY" and "WITH [UNIQUE | NON-UNIQUE] DEFAULT KEY" and "WITH [UNIQUE | NON-UNIQUE] KEY comp1 [comp2 [comp3]]"
675
+
// however, do accept the short cases of "WITH EMPTY KEY" and "WITH [UNIQUE | NON-UNIQUE] DEFAULT KEY" and "WITH [UNIQUE | NON-UNIQUE] KEY comp1 [comp2 [comp3]]";
676
+
// also, do not align component lists of generic type definitions, i.e. TYPES ... TYPE ANY STRUCTURE CONTAINING component_list
0 commit comments