Skip to content

Commit 029b567

Browse files
Napalysaschackmull
andauthored
Update ql/ql/src/queries/style/ValidatePredicateGetReturns.ql
Co-authored-by: Anders Schack-Mulligen <[email protected]>
1 parent a5521b9 commit 029b567

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ql/ql/src/queries/style/ValidatePredicateGetReturns.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import codeql_ql.ast.Ast
1616
* Identifies predicates whose names start with "get" followed by an uppercase letter.
1717
* This ensures that only predicates like "getValue" are matched, excluding names like "getter".
1818
*/
19-
predicate isGetPredicate(Predicate pred) { pred.getName().regexpMatch("get[A-Z].*") }
19+
predicate isGetPredicate(Predicate pred) { pred.getName().regexpMatch("(get|as)[A-Z].*") }
2020

2121
/**
2222
* Checks if a predicate has a return type.

0 commit comments

Comments
 (0)