mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
flag less overly general functions with js/unneeded-defensive-code
This commit is contained in:
@@ -51,5 +51,8 @@ where
|
||||
or
|
||||
// too benign in practice
|
||||
e instanceof DefensiveExpressionTest::DefensiveInit
|
||||
or
|
||||
// functions might be written overly general
|
||||
e.getALocalSource() instanceof DataFlow::ParameterNode
|
||||
)
|
||||
select e, "This guard always evaluates to " + cv + "."
|
||||
|
||||
Reference in New Issue
Block a user