Skip to content

Commit

Permalink
Modified comments to reflect 'as' changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Napalys committed Nov 29, 2024
1 parent e33f7aa commit 96c1086
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ql/ql/src/queries/style/ValidatePredicateGetReturns.ql
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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].*") }
Expand Down

0 comments on commit 96c1086

Please sign in to comment.