Skip to content

Commit d96d672

Browse files
committed
change the alert message of unused-local-variable
1 parent de8384d commit d96d672

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cpp/ql/src/Best Practices/Unused Entities/UnusedLocals.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ where
5858
not exists(AsmStmt s | f = s.getEnclosingFunction()) and
5959
not v.getAnAttribute().getName() = "unused" and
6060
not any(ErrorExpr e).getEnclosingFunction() = f // unextracted expr may use `v`
61-
select v, "The value assigned to local variable '" + v.getName() + "' is never used."
61+
select v, "Variable " + v.getName() + " is not used"

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 unused, "The value assigned to local variable '" + v.getId() + "' is never used."
46+
select v, "Variable " + v.getId() + " is not used"

0 commit comments

Comments
 (0)