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 1
1
/**
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.
4
4
* @kind problem
5
5
* @problem.severity warning
6
6
* @id ql/predicates-get-should-return-value
@@ -13,7 +13,7 @@ import ql
13
13
import codeql_ql.ast.Ast
14
14
15
15
/**
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.
17
17
* This ensures that only predicates like "getValue" are matched, excluding names like "getter".
18
18
*/
19
19
predicate isGetPredicate ( Predicate pred ) { pred .getName ( ) .regexpMatch ( "(get|as)[A-Z].*" ) }
You can’t perform that action at this time.
0 commit comments