mirror of
https://github.com/github/codeql.git
synced 2026-02-09 19:51:07 +01:00
Add check for predicates with an override annotation
This commit is contained in:
@@ -81,5 +81,6 @@ where
|
||||
not usesThis(pred) and
|
||||
not isTrivialImplementation(pred) and
|
||||
not isSingleton(pred.getDeclaringType()) and
|
||||
not exists(ClassPredicate other | pred.overrides(other) or other.overrides(pred))
|
||||
not exists(ClassPredicate other | pred.overrides(other) or other.overrides(pred)) and
|
||||
not pred.isOverride()
|
||||
select pred, "This predicate could be a classless predicate, as it doesn't depend on `this`."
|
||||
|
||||
Reference in New Issue
Block a user