Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 4b275fe

Browse files
exclude case expressions in A13, they are always multi-line
1 parent f02ed87 commit 4b275fe

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

settings/sql_developer/trivadis_custom_format.arbori

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1125,10 +1125,19 @@ a13_short_nodes:
11251125
return false;
11261126
}
11271127

1128+
var containsCase = function(node) {
1129+
for (var i=node.from+1; i < node.to; i++) {
1130+
if (target.src.get(i).content.toLowerCase() == 'case') {
1131+
return true;
1132+
}
1133+
}
1134+
return false;
1135+
}
1136+
11281137
var maxLen = maxCharLineSize / 2;
11291138
var node = tuple.get("node");
11301139
if (getNodeLength(node) <= maxLen) {
1131-
if (breaksConcat == Format$Breaks.None || !containsConcat(node)) {
1140+
if ((breaksConcat == Format$Breaks.None || !containsConcat(node)) && !containsCase(node)) {
11321141
reduceNodeIndents(node);
11331142
}
11341143
}

0 commit comments

Comments
 (0)