Commit a9a9c37
[analyzer] Prepare to rename error codes to camelCase.
A temporary script is added,
`pkg/analyzer/tool/messages/rename_error_constants.dart`, which will
rename every error code in the analyzer (and related packages) from
SCREAMING_CAPS to camelCase.
Also, the error message code generator is enhanced so that it can
generate error codes using either SCREAMING_CAPS or camelCase, based
on the setting of a temporary constant, `_useLowerCamelCaseNames`. The
constant is currently set to `false`; `rename_error_constants.dart`
will change it to `true`.
There are a few references to the old SCREAMING_CAPS names that won't
be able to be automatically addressed by the script. To avoid
breakages, a mechanism has been added to the error message code
generator to preserve those names after the migration, as deprecated
aliases. The names that will be preserved are listed in the
`ErrorClassInfo.deprecatedSnakeCaseNames` field, in
`error_code_info.dart`. These will be cleaned up in future CLs.
Once the rename is complete, the temporary script and constant will be
removed.
Change-Id: I6a6a69640b077c6bc4da92cec97686e4b2c3b906
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444920
Reviewed-by: Konstantin Shcheglov <[email protected]>
Reviewed-by: Moritz Sümmermann <[email protected]>
Commit-Queue: Paul Berry <[email protected]>1 parent 6f4b7e2 commit a9a9c37
File tree
7 files changed
+267
-13
lines changed- pkg/analyzer
- lib/src/utilities/extensions
- test/src/utilities/extensions
- tool/messages
- tools/verify_docs/bin
7 files changed
+267
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
163 | 190 | | |
164 | 191 | | |
165 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
200 | 212 | | |
201 | 213 | | |
202 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
| |||
51 | 58 | | |
52 | 59 | | |
53 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
54 | 66 | | |
55 | 67 | | |
56 | 68 | | |
57 | 69 | | |
58 | 70 | | |
59 | 71 | | |
60 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
61 | 80 | | |
62 | 81 | | |
63 | 82 | | |
64 | 83 | | |
65 | 84 | | |
66 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
67 | 90 | | |
68 | 91 | | |
69 | 92 | | |
| |||
492 | 515 | | |
493 | 516 | | |
494 | 517 | | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
495 | 523 | | |
496 | 524 | | |
497 | 525 | | |
| |||
500 | 528 | | |
501 | 529 | | |
502 | 530 | | |
| 531 | + | |
503 | 532 | | |
504 | 533 | | |
505 | 534 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
37 | 46 | | |
38 | 47 | | |
39 | 48 | | |
| |||
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
47 | | - | |
| 56 | + | |
48 | 57 | | |
49 | 58 | | |
50 | 59 | | |
| |||
72 | 81 | | |
73 | 82 | | |
74 | 83 | | |
75 | | - | |
| 84 | + | |
76 | 85 | | |
77 | 86 | | |
78 | 87 | | |
| |||
154 | 163 | | |
155 | 164 | | |
156 | 165 | | |
157 | | - | |
158 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
159 | 170 | | |
160 | 171 | | |
161 | 172 | | |
162 | 173 | | |
163 | 174 | | |
164 | 175 | | |
165 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
166 | 186 | | |
167 | 187 | | |
168 | 188 | | |
| |||
205 | 225 | | |
206 | 226 | | |
207 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
208 | 231 | | |
209 | 232 | | |
210 | 233 | | |
211 | 234 | | |
212 | 235 | | |
213 | 236 | | |
214 | 237 | | |
215 | | - | |
| 238 | + | |
216 | 239 | | |
217 | 240 | | |
218 | 241 | | |
| |||
239 | 262 | | |
240 | 263 | | |
241 | 264 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
246 | 269 | | |
247 | | - | |
| 270 | + | |
248 | 271 | | |
249 | 272 | | |
250 | 273 | | |
| |||
261 | 284 | | |
262 | 285 | | |
263 | 286 | | |
264 | | - | |
265 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
266 | 292 | | |
267 | 293 | | |
268 | 294 | | |
| |||
0 commit comments