mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Update ql/ql/src/queries/style/ValidatePredicateGetReturns.ql
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
This commit is contained in:
@@ -16,7 +16,7 @@ import codeql_ql.ast.Ast
|
|||||||
* Identifies predicates whose names start with "get" followed by an uppercase letter.
|
* 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".
|
* 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.
|
* Checks if a predicate has a return type.
|
||||||
|
|||||||
Reference in New Issue
Block a user