Commit 588a89f
linter: Move LintDriver into linter package
The only remaining use of LintDriver was in `test_linter.dart` in the
linter package. Moving this code unveiled a bunch of stuff that could
be removed or made private:
* The only use of DriverOptions was the class LinterOptions which
subclasses it; so just combine the two classes.
* Once combined, we also see that none of `cacheSize, `enabledLints`,
or `packageConfigPath` are every used; remove them. This also
simplifies the code in `LintDriver.analyze`, in the call to create
the `AnalysisContextCollection`.
* Move the top-level function `createSource` to `test_linter.dart`.
* Remove unused `TestLinter.numSourcesAnalyzed`.
* Remove unused `LintDriver.numSourcesAnalyzed`.
* The StdInstrumentation is only used locally; privatize it.
* test_linter.dart does not need to export any libraries.
Change-Id: I5eee9570eefa2ecb11e72852f5d46b2e6c12ea11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391321
Reviewed-by: Phil Quitslund <[email protected]>
Commit-Queue: Samuel Rawlins <[email protected]>1 parent da14b16 commit 588a89f
File tree
3 files changed
+32
-83
lines changed- pkg
- analyzer/lib/src/lint
- linter/lib/src/test_utilities
3 files changed
+32
-83
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
184 | 183 | | |
185 | 184 | | |
186 | 185 | | |
187 | | - | |
| 186 | + | |
188 | 187 | | |
189 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
190 | 195 | | |
191 | 196 | | |
192 | 197 | | |
| |||
Lines changed: 14 additions & 67 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | 5 | | |
9 | 6 | | |
10 | 7 | | |
11 | 8 | | |
12 | | - | |
13 | 9 | | |
14 | | - | |
15 | | - | |
| 10 | + | |
16 | 11 | | |
| 12 | + | |
17 | 13 | | |
| 14 | + | |
18 | 15 | | |
| 16 | + | |
19 | 17 | | |
20 | 18 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 19 | | |
54 | 20 | | |
55 | 21 | | |
| |||
61 | 27 | | |
62 | 28 | | |
63 | 29 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | 30 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 31 | + | |
73 | 32 | | |
74 | 33 | | |
75 | 34 | | |
76 | | - | |
77 | 35 | | |
78 | 36 | | |
79 | 37 | | |
| |||
82 | 40 | | |
83 | 41 | | |
84 | 42 | | |
85 | | - | |
| 43 | + | |
86 | 44 | | |
87 | 45 | | |
88 | 46 | | |
| |||
114 | 72 | | |
115 | 73 | | |
116 | 74 | | |
117 | | - | |
118 | | - | |
119 | | - | |
| 75 | + | |
120 | 76 | | |
121 | 77 | | |
122 | 78 | | |
123 | 79 | | |
124 | 80 | | |
125 | | - | |
| 81 | + | |
126 | 82 | | |
127 | 83 | | |
128 | 84 | | |
| |||
132 | 88 | | |
133 | 89 | | |
134 | 90 | | |
135 | | - | |
136 | | - | |
137 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
138 | 96 | | |
139 | 97 | | |
140 | 98 | | |
| |||
147 | 105 | | |
148 | 106 | | |
149 | 107 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | | - | |
15 | | - | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| |||
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | | - | |
51 | 49 | | |
52 | | - | |
53 | 50 | | |
54 | 51 | | |
55 | 52 | | |
| |||
63 | 60 | | |
64 | 61 | | |
65 | 62 | | |
66 | | - | |
| 63 | + | |
67 | 64 | | |
68 | 65 | | |
69 | 66 | | |
| |||
0 commit comments