From 96c1086dfc674ae6e5ddece815d0991e8ae9f309 Mon Sep 17 00:00:00 2001 From: Napalys Date: Fri, 29 Nov 2024 15:35:18 +0100 Subject: [PATCH] Modified comments to reflect 'as' changes --- ql/ql/src/queries/style/ValidatePredicateGetReturns.ql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ql/ql/src/queries/style/ValidatePredicateGetReturns.ql b/ql/ql/src/queries/style/ValidatePredicateGetReturns.ql index eae483d287f..065e24f9b2e 100644 --- a/ql/ql/src/queries/style/ValidatePredicateGetReturns.ql +++ b/ql/ql/src/queries/style/ValidatePredicateGetReturns.ql @@ -1,6 +1,6 @@ /** - * @name Predicates starting with "get" should return a value - * @description Checks if predicates that start with "get" actually return a value. + * @name Predicates starting with "get" or "as" should return a value + * @description Checks if predicates that start with "get" or "as" actually return a value. * @kind problem * @problem.severity warning * @id ql/predicates-get-should-return-value @@ -13,7 +13,7 @@ import ql import codeql_ql.ast.Ast /** - * Identifies predicates whose names start with "get" followed by an uppercase letter. + * Identifies predicates whose names start with "get", "as" 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|as)[A-Z].*") }