Skip to content

Commit 014dcd1

Browse files
committed
fixup a Python query, it didn't select something with a location
1 parent 5d9b25c commit 014dcd1

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

python/ql/src/Variables/UnusedLocalVariable.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ where
4343
unused_local(unused, v) and
4444
// If unused is part of a tuple, count it as unused if all elements of that tuple are unused.
4545
forall(Name el | el = unused.getParentNode().(Tuple).getAnElt() | unused_local(el, _))
46-
select v, "Variable " + v.getId() + " is not used"
46+
select unused, "Variable " + v.getId() + " is not used"
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
| Local Variable a | Variable a is not used |
2-
| Local Variable b | Variable b is not used |
3-
| Local Variable c | Variable c is not used |
4-
| Local Variable var | Variable var is not used |
5-
| Local Variable x | Variable x is not used |
1+
| variables_test.py:29:5:29:5 | x | Variable x is not used |
2+
| variables_test.py:89:5:89:5 | a | Variable a is not used |
3+
| variables_test.py:89:7:89:7 | b | Variable b is not used |
4+
| variables_test.py:89:9:89:9 | c | Variable c is not used |
5+
| variables_test.py:95:5:95:7 | var | Variable var is not used |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| Local Variable test | Variable test is not used |
1+
| variables_test.py:32:9:32:12 | test | Variable test is not used |

0 commit comments

Comments
 (0)