File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 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
1313import 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 */
1919predicate isGetPredicate ( Predicate pred ) { pred .getName ( ) .regexpMatch ( "(get|as)[A-Z].*" ) }
You can’t perform that action at this time.
0 commit comments