Skip to content

Commit 6784b5e

Browse files
author
gmickus
committed
Update settings
1 parent 478d184 commit 6784b5e

File tree

32 files changed

+178
-122
lines changed

32 files changed

+178
-122
lines changed

package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"New",
5353
"Same"
5454
],
55-
"description": "Should assigns be located on same or new line after ASSIGN keyword?"
55+
"description": "Should assigns be located on a new line or the same line as the ASSIGN keyword?"
5656
},
5757
"AblFormatter.assignFormattingAlignRightExpression": {
5858
"order": 102,
@@ -73,7 +73,7 @@
7373
"New aligned",
7474
"Same"
7575
],
76-
"description": "Should end dot be located on same or new line after ASSIGN statement?"
76+
"description": "Should end dot be located on a new line or the same line as the ASSIGN keyword?"
7777
},
7878
"AblFormatter.findFormatting": {
7979
"order": 300,
@@ -101,12 +101,12 @@
101101
"New",
102102
"Same"
103103
],
104-
"description": "Should THEN clause be on a new line or the same line as the WHEN keyword?"
104+
"description": "Should THEN clause be on a new line or the same line as the CASE keyword?"
105105
},
106106
"AblFormatter.caseFormattingDoLocation": {
107107
"order": 502,
108108
"type": "string",
109-
"default": "New",
109+
"default": "Same",
110110
"enum": [
111111
"New",
112112
"Same"
@@ -213,7 +213,7 @@
213213
"New",
214214
"Same"
215215
],
216-
"description": "Add a new line before the ELSE?"
216+
"description": "Should ELSE clause be on a new line or the same line as the IF FUNCTION keyword?"
217217
},
218218
"AblFormatter.enumFormatting": {
219219
"order": 1300,
@@ -267,7 +267,7 @@
267267
"AblFormatter.arrayAccessFormattingAddSpaceAfterComma": {
268268
"order": 1701,
269269
"type": "string",
270-
"default": "No",
270+
"default": "Yes",
271271
"enum": [
272272
"Yes",
273273
"No"
@@ -283,7 +283,7 @@
283283
"AblFormatter.expressionFormattingLogicalLocation": {
284284
"order": 1801,
285285
"type": "string",
286-
"default": "Same",
286+
"default": "New",
287287
"enum": [
288288
"New",
289289
"Same"
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/* formatterSettingsOverride */
22
/* { "AblFormatter.arrayAccessFormatting": true}*/
33

4-
VAR INT[4] myArray = [10,11,12,13].
4+
VAR INT[4] myArray = [10, 11, 12, 13].
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* formatterSettingsOverride */
22
/* { "AblFormatter.arrayAccessFormatting": true}*/
33

4-
DEFINE VARIABLE myArray AS INTEGER EXTENT 5 NO-UNDO INITIAL [10,11,12,13,14].
4+
DEFINE VARIABLE myArray AS INTEGER EXTENT 5 NO-UNDO INITIAL [10, 11, 12, 13, 14].
55

66
DISPLAY myArray[1 FOR 5].

resources/functionalTests/arrayAccess/4-array-literal3-add-space/target.p

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/* formatterSettingsOverride */
2+
/* { "AblFormatter.arrayAccessFormatting": true,
3+
"AblFormatter.arrayAccessFormattingAddSpaceAfterComma": "No"}*/
4+
5+
VAR INT[] monthlySalesQuotas = [ 100500, 125000, 125000, 175000, 150000, 155000, 145000].
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* formatterSettingsOverride */
22
/* { "AblFormatter.arrayAccessFormatting": true,
3-
"AblFormatter.arrayAccessFormattingAddSpaceAfterComma": "Yes"}*/
3+
"AblFormatter.arrayAccessFormattingAddSpaceAfterComma": "No"}*/
44

55
VAR INT[] monthlySalesQuotas = [100500,125000,125000,175000,150000,155000,145000].
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
/* formatterSettingsOverride */
2-
/* { "abl.completion.upperCase": true,
3-
"AblFormatter.caseFormatting": true,
4-
"AblFormatter.blockFormatting": false}*/
5-
6-
PROCEDURE testCase:
7-
DEFINE VARIABLE i AS INTEGER NO-UNDO.
8-
DEFINE VARIABLE j AS INTEGER NO-UNDO.
9-
10-
i = 1.
11-
j = 2.
12-
13-
CASE i:
14-
WHEN 1 THEN DO:
15-
CASE j:
16-
WHEN 1 THEN
17-
MESSAGE "i=1, j=1".
18-
WHEN 2 THEN
19-
MESSAGE "i=1, j=2".
20-
OTHERWISE
21-
MESSAGE "i=1, j=Other".
22-
END CASE.
23-
END.
24-
WHEN 2 THEN
25-
MESSAGE "i=2".
26-
OTHERWISE
27-
MESSAGE "i=Other".
28-
END CASE.
1+
/* formatterSettingsOverride */
2+
/* { "abl.completion.upperCase": true,
3+
"AblFormatter.caseFormatting": true,
4+
"AblFormatter.blockFormatting": true}*/
5+
6+
PROCEDURE testCase:
7+
DEFINE VARIABLE i AS INTEGER NO-UNDO.
8+
DEFINE VARIABLE j AS INTEGER NO-UNDO.
9+
10+
i = 1.
11+
j = 2.
12+
13+
CASE i:
14+
WHEN 1 THEN DO:
15+
CASE j:
16+
WHEN 1 THEN
17+
MESSAGE "i=1, j=1".
18+
WHEN 2 THEN
19+
MESSAGE "i=1, j=2".
20+
OTHERWISE
21+
MESSAGE "i=1, j=Other".
22+
END CASE.
23+
END.
24+
WHEN 2 THEN
25+
MESSAGE "i=2".
26+
OTHERWISE
27+
MESSAGE "i=Other".
28+
END CASE.
2929
END PROCEDURE.
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
1-
/* formatterSettingsOverride */
2-
/* { "abl.completion.upperCase": true,
3-
"AblFormatter.caseFormatting": true,
4-
"AblFormatter.blockFormatting": false}*/
5-
6-
PROCEDURE testCase:
7-
DEFINE VARIABLE i AS INTEGER NO-UNDO.
8-
DEFINE VARIABLE j AS INTEGER NO-UNDO.
9-
10-
i = 1.
11-
j = 2.
12-
13-
CASE i:
14-
WHEN 1 THEN
15-
DO:
16-
CASE j:
17-
WHEN 1 THEN
18-
MESSAGE "i=1, j=1".
19-
WHEN 2 THEN
20-
MESSAGE "i=1, j=2".
21-
OTHERWISE
22-
MESSAGE "i=1, j=Other".
23-
END CASE.
24-
END.
25-
WHEN 2 THEN
26-
MESSAGE "i=2".
27-
OTHERWISE
28-
MESSAGE "i=Other".
29-
END CASE.
1+
/* formatterSettingsOverride */
2+
/* { "abl.completion.upperCase": true,
3+
"AblFormatter.caseFormatting": true,
4+
"AblFormatter.blockFormatting": true}*/
5+
6+
PROCEDURE testCase:
7+
DEFINE VARIABLE i AS INTEGER NO-UNDO.
8+
DEFINE VARIABLE j AS INTEGER NO-UNDO.
9+
10+
i = 1.
11+
j = 2.
12+
13+
CASE i:
14+
WHEN 1 THEN DO:
15+
CASE j:
16+
WHEN 1 THEN
17+
MESSAGE "i=1, j=1".
18+
WHEN 2 THEN
19+
MESSAGE "i=1, j=2".
20+
OTHERWISE
21+
MESSAGE "i=1, j=Other".
22+
END CASE.
23+
END.
24+
WHEN 2 THEN
25+
MESSAGE "i=2".
26+
OTHERWISE
27+
MESSAGE "i=Other".
28+
END CASE.
3029
END PROCEDURE.

resources/functionalTests/case/4nested-blockFormattingTrue/target.p

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ PROCEDURE testCase:
1111
j = 2.
1212

1313
CASE i:
14-
WHEN 1 THEN
15-
DO:
14+
WHEN 1 THEN DO:
1615
CASE j:
1716
WHEN 1 THEN
1817
MESSAGE "i=1, j=1".

resources/functionalTests/defineVariable/2no-undo4/target.p

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DEFINE VARIABLE iAge AS INTEGER NO-UNDO LABEL "Age of Person" INITIAL 0.
66
DEFINE VARIABLE dBirthDate AS DATE NO-UNDO FORMAT "99/99/9999" INITIAL TODAY.
77
DEFINE VARIABLE hBuffer AS HANDLE NO-UNDO INITIAL BUFFER Customer:HANDLE.
88
DEFINE VARIABLE mData AS MEMPTR NO-UNDO INITIAL ?.
9-
DEFINE VARIABLE cJson AS CHARACTER NO-UNDO EXTENT 5 INITIAL ["","","","",""].
9+
DEFINE VARIABLE cJson AS CHARACTER NO-UNDO EXTENT 5 INITIAL ["", "", "", "", ""].
1010
DEFINE VARIABLE rAmount AS DECIMAL NO-UNDO FORMAT "->,>>>,>>9.99" INITIAL 0.
1111
DEFINE VARIABLE lFlag AS LOGICAL NO-UNDO INITIAL FALSE.
1212
DEFINE VARIABLE cXml AS LONGCHAR NO-UNDO INITIAL "".

resources/functionalTests/defineVariable/4define-protected/target.p

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ define protected variable mBuffer as handle no-undo.
66
define protected variable ValidRecordsPerBlockNumbers as char no-undo init "1,2,4,8,16,32,64,128,256".
77
define protected variable ValidRecordsPerBlockString as char no-undo init "1, 2, 4, 8, 16, 32, 64, 128 and 256".
88
/* area type names */
9-
define protected variable AreaTypeNames as char no-undo extent 7 init ["Undefined","Undefined","Recovery","Transaction log","Event log","Data","Rollforward recovery"].
9+
define protected variable AreaTypeNames as char no-undo extent 7 init ["Undefined", "Undefined", "Recovery", "Transaction log", "Event log", "Data", "Rollforward recovery"].
1010

resources/functionalTests/find/2multipleConditions/target.p

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
/* { "AblFormatter.findFormatting": true}*/
33

44
FIND Customer WHERE
5-
Customer.CustNum = 5 AND Customer.CustNum = 6 OR Customer.CustNum = 8 no-lock no-error.
5+
Customer.CustNum = 5 AND
6+
Customer.CustNum = 6 OR
7+
Customer.CustNum = 8 no-lock no-error.

resources/functionalTests/find/3multipleConditions-()/target.p

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
/* { "AblFormatter.findFormatting": true}*/
33

44
FIND Customer WHERE
5-
(Customer.CustNum > 50 AND Customer.CustNum < 100) OR Customer.CustNum > 200 NO-ERROR.
5+
(Customer.CustNum > 50 AND
6+
Customer.CustNum < 100) OR
7+
Customer.CustNum > 200 NO-ERROR.

resources/functionalTests/find/4multipleConditions-()2/target.p

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
/* { "AblFormatter.findFormatting": true}*/
33

44
FIND Order WHERE
5-
(Order.OrderStatus = "Shipped" AND (Order.ShipDate > TODAY - 7)) OR (Order.OrderStatus = "Pending" AND (Order.OrderDate = TODAY)) no-lock.
5+
(Order.OrderStatus = "Shipped" AND
6+
(Order.ShipDate > TODAY - 7)) OR
7+
(Order.OrderStatus = "Pending" AND
8+
(Order.OrderDate = TODAY)) no-lock.

resources/functionalTests/find/6useIndex/target.p

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
/* { "AblFormatter.findFormatting": true}*/
33

44
find Order where
5-
Order.OrderStatus = "Shipped" and Order.ShipDate = today use-index OrderNum.
5+
Order.OrderStatus = "Shipped" and
6+
Order.ShipDate = today use-index OrderNum.

resources/functionalTests/find/7of-table/target.p

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
/* { "AblFormatter.findFormatting": true}*/
33

44
FIND FIRST Order OF Customer WHERE
5-
Customer.Country = "USA" AND Customer.Balance > 1000.
5+
Customer.Country = "USA" AND
6+
Customer.Balance > 1000.

resources/functionalTests/for/4each-where3/target.p

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
}*/
55

66
for each Customer where
7-
Customer.var = 1 or Customer.var = 2 or Customer.var = 3:
7+
Customer.var = 1 or
8+
Customer.var = 2 or
9+
Customer.var = 3:
810
Customer.var += 1.
911
end.

resources/functionalTests/for/7each-complex/target.p

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
/* { "AblFormatter.forFormatting": true}*/
33

44
FOR EACH Customer NO-LOCK WHERE
5-
(Customer.Balance > 10000 AND Customer.Region = "North") OR (Customer.Region = "South" AND Customer.Status = "Active")
5+
(Customer.Balance > 10000 AND
6+
Customer.Region = "North") OR
7+
(Customer.Region = "South" AND
8+
Customer.Status = "Active")
69
BY Customer.LastName
710
BY Customer.FirstName
811
BREAK BY Customer.City

resources/functionalTests/if/18-then-same-do-new/target.p

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"AblFormatter.ifFormattingStatementLocation": "New",
66
"AblFormatter.ifFormattingDoLocation": "New"}*/
77

8-
if something <> ? and something <> 0 then
8+
if something <> ? and
9+
something <> 0 then
910
oObject:method(something).
1011
else if a = 3 then
1112
do:

resources/functionalTests/if/19-then-same-do-new/target.p

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
"AblFormatter.ifFormattingStatementLocation": "New",
66
"AblFormatter.ifFormattingDoLocation": "New"}*/
77

8-
if something <> ? and something <> 0 then
8+
if something <> ? and
9+
something <> 0 then
910
oObject:method(something).
10-
else if something <> ? or something <> ? then
11+
else if something <> ? or
12+
something <> ? then
1113
do:
1214
oObject:method(something).
1315
end.

resources/functionalTests/if/20-then-same-statement-new-do-new/target.p

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"AblFormatter.ifFormattingStatementLocation": "New",
66
"AblFormatter.ifFormattingDoLocation": "New"}*/
77

8-
if something <> ? and something <> 0 then
8+
if something <> ? and
9+
something <> 0 then
910
oObject:method(something).
1011
else if a = 3 then
1112
do:

resources/functionalTests/ifFunction/11else-new-line-in-for/target.p

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55

66
FOR EACH Customer NO-LOCK
77
BY (IF Customer.Balance > 10000 THEN 1
8-
ELSE (IF Customer.Balance > 5000 THEN 1.5
9-
ELSE (IF Customer.Balance > 1000 THEN 2
10-
ELSE (IF Customer.Balance > 500 THEN 2.5
11-
ELSE 3))))
8+
ELSE (IF Customer.Balance > 5000 THEN 1.5
9+
ELSE (IF Customer.Balance > 1000 THEN 2
10+
ELSE (IF Customer.Balance > 500 THEN 2.5
11+
ELSE 3))))
1212
BY (IF Customer.SalesRep = "John" THEN 1
13-
ELSE (IF Customer.SalesRep = "Jane" THEN 2
14-
ELSE (IF Customer.SalesRep = "Doe" THEN 3
15-
ELSE 4))):
13+
ELSE (IF Customer.SalesRep = "Jane" THEN 2
14+
ELSE (IF Customer.SalesRep = "Doe" THEN 3
15+
ELSE 4))):
1616
DISPLAY Customer.SalesRep Customer.Balance Customer.Name.
1717
END.
1818

resources/functionalTests/ifFunction/3parentheses-expression-with-and/target.p

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
/* { "AblFormatter.ifFunctionFormatting": true,
33
"AblFormatter.ifFunctionFormattingAddParentheses": "Yes"}*/
44

5-
a = (if Customer.Balance > 10000 and Customer.Country = "USA" then 1 else 2).
5+
a = (if Customer.Balance > 10000 and
6+
Customer.Country = "USA" then 1 else 2).

resources/functionalTests/ifFunction/5parentheses-else-new-line/target.p

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"AblFormatter.ifFunctionFormattingElseLocation": "New"}*/
55

66
a = (if Customer.Balance > 10000 then 1
7-
else 2).
7+
else 2).

0 commit comments

Comments
 (0)