Commit 2bcc415
analyzer: Report unnecessary import directives.
In a given library, every import directive has a set of "used
elements," the subset of elements provided by the import which are
used in the library. In a given library, an import directive is
"unnecessary" if there exists at least one other import directive
with the same prefix as the aforementioned import directive, and a
"used elements" set which is a proper superset of the
aforementioned import directive's "used elements" set.
#44569
Change-Id: I4da43be36837cdafb07a0ab67a94e644f351e593
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177221
Commit-Queue: Samuel Rawlins <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>1 parent 53b08e3 commit 2bcc415
File tree
8 files changed
+449
-65
lines changed- pkg
- analysis_server/test/src/services/correction/fix
- analyzer
- lib
- error
- src
- dart
- analysis
- error
- error
- test/src/diagnostics
8 files changed
+449
-65
lines changedLines changed: 0 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | | - | |
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
| |||
60 | 58 | | |
61 | 59 | | |
62 | 60 | | |
63 | | - | |
64 | 61 | | |
65 | 62 | | |
66 | 63 | | |
| |||
72 | 69 | | |
73 | 70 | | |
74 | 71 | | |
75 | | - | |
76 | 72 | | |
77 | 73 | | |
78 | 74 | | |
| |||
335 | 331 | | |
336 | 332 | | |
337 | 333 | | |
338 | | - | |
339 | 334 | | |
340 | 335 | | |
341 | 336 | | |
| |||
349 | 344 | | |
350 | 345 | | |
351 | 346 | | |
352 | | - | |
353 | 347 | | |
354 | 348 | | |
355 | 349 | | |
| |||
367 | 361 | | |
368 | 362 | | |
369 | 363 | | |
370 | | - | |
371 | 364 | | |
372 | 365 | | |
373 | 366 | | |
| |||
381 | 374 | | |
382 | 375 | | |
383 | 376 | | |
384 | | - | |
385 | 377 | | |
386 | 378 | | |
387 | 379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| 595 | + | |
595 | 596 | | |
596 | 597 | | |
597 | 598 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
| 303 | + | |
302 | 304 | | |
303 | 305 | | |
304 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2684 | 2684 | | |
2685 | 2685 | | |
2686 | 2686 | | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
2687 | 2693 | | |
2688 | 2694 | | |
2689 | 2695 | | |
| |||
0 commit comments