File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed
test/query-tests/diagnostics Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * @name Unextracted Elements
3+ * @description List all elements that weren't extracted due to unimplemented features or parse errors.
4+ * @id rust/diagnostics/unextracted-elements
5+ */
6+
7+ import rust
8+
9+ /**
10+ * Gets a string along the lines of " (x2)", corresponding to the number `i`.
11+ * For `i = 1`, the result is the empty string.
12+ */
13+ bindingset [ i]
14+ string multipleString ( int i ) {
15+ i = 1 and result = ""
16+ or
17+ i > 1 and result = " (x" + i .toString ( ) + ")"
18+ }
19+
20+ from string name , int c
21+ where c = strictcount ( Unextracted e | e .toString ( ) = name )
22+ // we don't have locations, so just list the number of each type of
23+ // `Unextracted` element.
24+ select name + multipleString ( c )
Original file line number Diff line number Diff line change 1+ queries/diagnostics/UnextractedElements.ql
You can’t perform that action at this time.
0 commit comments