We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a1abc7 commit c160a1fCopy full SHA for c160a1f
rust/ql/src/queries/unusedentities/UnusedVariable.qll
@@ -43,4 +43,8 @@ predicate isAllowableUnused(Variable v) {
43
or
44
// a 'self' variable
45
v.getText() = "self"
46
+ or
47
+ // a common source of false positives is match arms that are misrecognized as
48
+ // a variable, having not been correctly resolved
49
+ v.getPat().getParentNode() instanceof MatchArm
50
}
0 commit comments