Skip to content

Commit

Permalink
Update ql/ql/src/queries/style/ValidatePredicateGetReturns.ql
Browse files Browse the repository at this point in the history
Co-authored-by: Anders Schack-Mulligen <[email protected]>
  • Loading branch information
Napalys and aschackmull authored Nov 29, 2024
1 parent a5521b9 commit 029b567
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ql/ql/src/queries/style/ValidatePredicateGetReturns.ql
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import codeql_ql.ast.Ast
* Identifies predicates whose names start with "get" followed by an uppercase letter.
* This ensures that only predicates like "getValue" are matched, excluding names like "getter".
*/
predicate isGetPredicate(Predicate pred) { pred.getName().regexpMatch("get[A-Z].*") }
predicate isGetPredicate(Predicate pred) { pred.getName().regexpMatch("(get|as)[A-Z].*") }

/**
* Checks if a predicate has a return type.
Expand Down

0 comments on commit 029b567

Please sign in to comment.