Skip to content

Commit 8ff2992

Browse files
committed
have each case on a separate line
1 parent addb27c commit 8ff2992

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

ql/ql/src/queries/style/docs/PredicateDocs.ql

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,25 @@ where
2424
exists(pred.getReturnTypeExpr()) and
2525
not docLines(pred)
2626
.matches([
27-
["Gets", "Get", "Holds", "Create", "Creates"] + " %", "INTERNAL%", "DEPRECATED%",
27+
"Gets %", //
28+
"Get %", //
29+
"Holds %", // <- predicates without a result can sometimes still use 'Holds'.
30+
"Create %", //
31+
"Creates %", //
32+
"INTERNAL%", //
33+
"DEPRECATED%", //
2834
"EXPERIMENTAL%"
29-
]) and // <- predicates without a result can sometimes still use 'Holds'.
35+
]) and
3036
message = "The QLDoc for a predicate with a result should start with 'Gets'."
3137
or
3238
not exists(pred.getReturnTypeExpr()) and
33-
not docLines(pred).matches(["Holds ", "INTERNAL", "DEPRECATED", "EXPERIMENTAL"] + "%") and
39+
not docLines(pred)
40+
.matches([
41+
"Holds %", //
42+
"INTERNAL%", //
43+
"DEPRECATED%", //
44+
"EXPERIMENTAL%" //
45+
]) and
3446
message = "The QLDoc for a predicate without a result should start with 'Holds'."
3547
)
3648
select pred.getQLDoc(), message

0 commit comments

Comments
 (0)