-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rust: Add rust/diagnostics/unresolved-macro-calls diagnostic query.
- Loading branch information
Showing
3 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* @name Unresolved Macro Calls | ||
* @description List all macro calls that were not resolved to a target. | ||
* @id rust/diagnostics/unresolved-macro-calls | ||
*/ | ||
|
||
import rust | ||
|
||
from MacroCall mc | ||
where not mc.hasExpanded() | ||
select mc, "Macro call was not resolved to a target." |
1 change: 1 addition & 0 deletions
1
rust/ql/test/query-tests/diagnostics/UnresolvedMacroCalls.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
| my_macro.rs:17:9:17:27 | MacroCall | Macro call was not resolved to a target. | |
1 change: 1 addition & 0 deletions
1
rust/ql/test/query-tests/diagnostics/UnresolvedMacroCalls.qlref
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
queries/diagnostics/UnresolvedMacroCalls.ql |