Commit 4c94422
[analyzer] Change ErrorCodeInfo.toAnalyzerCode to accept ErrorClassInfo.
Previously, `ErrorCodeInfo.toAnalyzerCode` didn't know anything about
the error class it was generating an analyzer code for, other than the
class name (which was passed in via a `className` parameter). Changing
this parameter to an `ErrorClassInfo` type paves the way for a
follow-up CL in which I plan to generalize
`ErrorCodeInfo.toAnalyzerCode` so that it can generate analyzer error
codes that support `.withArguments()` (similar to how CFE error
formatting works).
To make this work, I had to create an instance of `ErrorClassInfo` in
`generate_lints.dart`, to represent the linter class `LinterLintCode`.
Change-Id: I160e27a46602da13f4757393fdaad4bc2f15d50e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/442165
Auto-Submit: Paul Berry <[email protected]>
Commit-Queue: Samuel Rawlins <[email protected]>
Reviewed-by: Samuel Rawlins <[email protected]>1 parent 96efc10 commit 4c94422
File tree
3 files changed
+15
-4
lines changed- pkg
- analyzer/tool/messages
- linter/tool
3 files changed
+15
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
605 | | - | |
| 605 | + | |
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
612 | | - | |
| 612 | + | |
613 | 613 | | |
614 | 614 | | |
615 | 615 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
26 | 37 | | |
27 | 38 | | |
28 | 39 | | |
| |||
61 | 72 | | |
62 | 73 | | |
63 | 74 | | |
64 | | - | |
| 75 | + | |
65 | 76 | | |
66 | 77 | | |
67 | 78 | | |
| |||
0 commit comments