Commit bcd7c3a
[messages] Prepare to standardize DiagnosticCode names to all lower case.
In a follow-up CL, I will change the code generator for diagnostic
messages so that all code-generated instances of `DiagnosticCode` have
`name` and `uniqueName` fields in all lower case letters. This will
help pave the way toward resolving conflicts between the diagnostic
code naming conventions between the analyzer and CFE.
To prepare for this change, the following pieces of code need to first
be modified to be case insensitive:
- The `_ignoreNullSafetyWarnings` check in
`RemoveDeadCodeSoundFlowAnalysisTest`.
- The `_diagnosticCodes` fields in `_CannotIgnoreOptionValidator` and
`_ErrorFilterOptionValidator`.
- The `computeErrorData` methods in `ConstantsDataComputer` and
`_InheritanceDataComputer`.
- The `_writeDiagnostic` methods in `DriverEventsPrinter` and
`ResolvedUnitResultPrinter`.
- The `_validateMessages` and `_validateSnippet` methods in
`DocumentationValidator`.
- The `run` method in `TextualOutline`.
In most cases, the code was changed to be case insensitive by having
it call `.toLowerCase()` or `.toUpperCase()` on the diagnostic code
name before operating on it. In one case I was able to re-use the
`AnalyzerCode.lowerSnakeCaseName` getter.
Change-Id: I6a6a6964f3cc4c71f2e82478855d64d5ef91d26b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/465804
Reviewed-by: Konstantin Shcheglov <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>
Commit-Queue: Paul Berry <[email protected]>1 parent 34a63b5 commit bcd7c3a
File tree
7 files changed
+23
-13
lines changed- pkg
- analysis_server/test/src/services/correction/fix
- analyzer
- lib/src/analysis_options
- test
- id_tests
- src/dart/analysis
- front_end/test
7 files changed
+23
-13
lines changedLines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1159 | 1159 | | |
1160 | 1160 | | |
1161 | 1161 | | |
1162 | | - | |
1163 | | - | |
1164 | | - | |
1165 | | - | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
1166 | 1166 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| |||
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
594 | | - | |
| 594 | + | |
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
412 | | - | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
413 | 415 | | |
414 | 416 | | |
415 | 417 | | |
| |||
1965 | 1967 | | |
1966 | 1968 | | |
1967 | 1969 | | |
1968 | | - | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
1969 | 1973 | | |
1970 | 1974 | | |
1971 | 1975 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
| 377 | + | |
| 378 | + | |
378 | 379 | | |
379 | 380 | | |
380 | 381 | | |
| |||
443 | 444 | | |
444 | 445 | | |
445 | 446 | | |
446 | | - | |
| 447 | + | |
447 | 448 | | |
448 | 449 | | |
449 | 450 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
| 174 | + | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| |||
0 commit comments