Commit de058e0
Privatize some elements in LintRuleTest
* `assertDiagnosticsIn` can always be replaced by the simpler
`assertDiagnosticsInFile`, which makes tests simpler. Then
`assertDiagnosticsIn` can be made private.
* `assertNoDiagnosticsIn` can always be replaced by the simpler
`assertNoDiagnosticsInFile`, which makes tests simpler. Then
`assertNoDiagnosticsIn` can be removed.
* Then the `errors` getter can be made private.
* Privatize the `ExpectedError` and `ExpectedLint` classes, as they are
not meant to be consumed. Also make them final.
* Move `findElement`, `findElement2`, and `findNode` to `scope_util_test.dart`.
* Remove the public `lintRules` getter.
Change-Id: Ie994745b06268a449a1b5613bfdcfa4785335d7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391684
Reviewed-by: Phil Quitslund <[email protected]>
Commit-Queue: Samuel Rawlins <[email protected]>1 parent c0126fc commit de058e0
File tree
23 files changed
+256
-379
lines changed- pkg/linter/test
- rules
23 files changed
+256
-379
lines changedLarge diffs are not rendered by default.
Lines changed: 10 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 35 | + | |
| 36 | + | |
40 | 37 | | |
41 | 38 | | |
42 | 39 | | |
| |||
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 52 | + | |
| 53 | + | |
60 | 54 | | |
61 | 55 | | |
62 | 56 | | |
| |||
80 | 74 | | |
81 | 75 | | |
82 | 76 | | |
83 | | - | |
84 | | - | |
| 77 | + | |
85 | 78 | | |
86 | 79 | | |
87 | | - | |
88 | | - | |
89 | | - | |
| 80 | + | |
90 | 81 | | |
91 | 82 | | |
92 | 83 | | |
| |||
102 | 93 | | |
103 | 94 | | |
104 | 95 | | |
105 | | - | |
106 | | - | |
| 96 | + | |
107 | 97 | | |
108 | 98 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 99 | + | |
112 | 100 | | |
113 | 101 | | |
114 | 102 | | |
| |||
125 | 113 | | |
126 | 114 | | |
127 | 115 | | |
128 | | - | |
129 | | - | |
| 116 | + | |
130 | 117 | | |
131 | 118 | | |
132 | | - | |
133 | | - | |
134 | | - | |
| 119 | + | |
135 | 120 | | |
136 | 121 | | |
137 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 43 | + | |
| 44 | + | |
48 | 45 | | |
49 | 46 | | |
50 | 47 | | |
| |||
Lines changed: 12 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 35 | + | |
| 36 | + | |
40 | 37 | | |
41 | 38 | | |
42 | 39 | | |
| |||
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 52 | + | |
| 53 | + | |
60 | 54 | | |
61 | 55 | | |
62 | 56 | | |
| |||
77 | 71 | | |
78 | 72 | | |
79 | 73 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 74 | + | |
| 75 | + | |
85 | 76 | | |
86 | 77 | | |
87 | 78 | | |
| |||
103 | 94 | | |
104 | 95 | | |
105 | 96 | | |
106 | | - | |
107 | | - | |
| 97 | + | |
108 | 98 | | |
109 | 99 | | |
110 | | - | |
111 | | - | |
112 | | - | |
| 100 | + | |
113 | 101 | | |
114 | 102 | | |
115 | 103 | | |
| |||
125 | 113 | | |
126 | 114 | | |
127 | 115 | | |
128 | | - | |
129 | | - | |
| 116 | + | |
130 | 117 | | |
131 | 118 | | |
132 | | - | |
133 | | - | |
134 | | - | |
| 119 | + | |
135 | 120 | | |
136 | 121 | | |
137 | 122 | | |
| |||
148 | 133 | | |
149 | 134 | | |
150 | 135 | | |
151 | | - | |
152 | | - | |
| 136 | + | |
153 | 137 | | |
154 | 138 | | |
155 | | - | |
156 | | - | |
157 | | - | |
| 139 | + | |
158 | 140 | | |
159 | 141 | | |
160 | 142 | | |
| |||
Lines changed: 8 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 38 | + | |
| 39 | + | |
43 | 40 | | |
44 | 41 | | |
45 | 42 | | |
| |||
57 | 54 | | |
58 | 55 | | |
59 | 56 | | |
60 | | - | |
61 | | - | |
| 57 | + | |
62 | 58 | | |
63 | 59 | | |
64 | 60 | | |
65 | | - | |
66 | | - | |
| 61 | + | |
67 | 62 | | |
68 | 63 | | |
69 | 64 | | |
| |||
81 | 76 | | |
82 | 77 | | |
83 | 78 | | |
84 | | - | |
85 | | - | |
| 79 | + | |
86 | 80 | | |
87 | 81 | | |
88 | 82 | | |
89 | | - | |
90 | | - | |
| 83 | + | |
91 | 84 | | |
92 | 85 | | |
93 | 86 | | |
| |||
119 | 112 | | |
120 | 113 | | |
121 | 114 | | |
122 | | - | |
123 | | - | |
| 115 | + | |
124 | 116 | | |
125 | | - | |
126 | | - | |
| 117 | + | |
127 | 118 | | |
128 | 119 | | |
129 | 120 | | |
| |||
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 81 | + | |
| 82 | + | |
86 | 83 | | |
87 | 84 | | |
88 | 85 | | |
| |||
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 38 | + | |
| 39 | + | |
43 | 40 | | |
44 | 41 | | |
45 | 42 | | |
| |||
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | | - | |
60 | | - | |
| 58 | + | |
61 | 59 | | |
62 | 60 | | |
63 | 61 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
145 | | - | |
| 144 | + | |
146 | 145 | | |
147 | 146 | | |
148 | 147 | | |
| |||
0 commit comments