Skip to content

Commit 2769bd6

Browse files
committed
Rust: Make the placeholder queries produce no results, to avoid confusion.
1 parent 3632a76 commit 2769bd6

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

rust/ql/src/queries/unusedentities/UnusedValue.ql

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
* @description Unused values may be an indication that the code is incomplete or has a typo.
44
* @kind problem
55
* @problem.severity recommendation
6-
* @precision high
6+
* @precision medium
77
* @id rust/unused-value
88
* @tags maintainability
99
*/
1010

11-
select 1, "Variable is assigned a value that is never used."
11+
import rust
12+
13+
from Locatable e
14+
where none() // TODO: implement query
15+
select e, "Variable is assigned a value that is never used."

rust/ql/src/queries/unusedentities/UnusedVariable.ql

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
* @description Unused variables may be an indication that the code is incomplete or has a typo.
44
* @kind problem
55
* @problem.severity recommendation
6-
* @precision high
6+
* @precision medium
77
* @id rust/unused-variable
88
* @tags maintainability
99
*/
1010

11-
select 1, "Variable is not used."
11+
import rust
12+
13+
from Locatable e
14+
where none() // TODO: implement query
15+
select e, "Variable is not used."
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
| 1 | Variable is assigned a value that is never used. |
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
| 1 | Variable is not used. |

0 commit comments

Comments
 (0)