fixup a Python query, it didn't select something with a location

This commit is contained in:
erik-krogh
2022-08-24 16:23:20 +02:00
parent 5d9b25c75d
commit 014dcd1454
3 changed files with 7 additions and 7 deletions

View File

@@ -43,4 +43,4 @@ where
unused_local(unused, v) and
// If unused is part of a tuple, count it as unused if all elements of that tuple are unused.
forall(Name el | el = unused.getParentNode().(Tuple).getAnElt() | unused_local(el, _))
select v, "Variable " + v.getId() + " is not used"
select unused, "Variable " + v.getId() + " is not used"

View File

@@ -1,5 +1,5 @@
| Local Variable a | Variable a is not used |
| Local Variable b | Variable b is not used |
| Local Variable c | Variable c is not used |
| Local Variable var | Variable var is not used |
| Local Variable x | Variable x is not used |
| variables_test.py:29:5:29:5 | x | Variable x is not used |
| variables_test.py:89:5:89:5 | a | Variable a is not used |
| variables_test.py:89:7:89:7 | b | Variable b is not used |
| variables_test.py:89:9:89:9 | c | Variable c is not used |
| variables_test.py:95:5:95:7 | var | Variable var is not used |

View File

@@ -1 +1 @@
| Local Variable test | Variable test is not used |
| variables_test.py:32:9:32:12 | test | Variable test is not used |