Skip to content

Commit 96c1086

Browse files
committed
Modified comments to reflect 'as' changes
1 parent e33f7aa commit 96c1086

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* @name Predicates starting with "get" should return a value
3-
* @description Checks if predicates that start with "get" actually return a value.
2+
* @name Predicates starting with "get" or "as" should return a value
3+
* @description Checks if predicates that start with "get" or "as" actually return a value.
44
* @kind problem
55
* @problem.severity warning
66
* @id ql/predicates-get-should-return-value
@@ -13,7 +13,7 @@ import ql
1313
import codeql_ql.ast.Ast
1414

1515
/**
16-
* Identifies predicates whose names start with "get" followed by an uppercase letter.
16+
* Identifies predicates whose names start with "get", "as" followed by an uppercase letter.
1717
* This ensures that only predicates like "getValue" are matched, excluding names like "getter".
1818
*/
1919
predicate isGetPredicate(Predicate pred) { pred.getName().regexpMatch("(get|as)[A-Z].*") }

0 commit comments

Comments
 (0)