Sam Rawlins
ee69f45a1f
analyzer: rework AnalysisErrorListener deprecation
...
Work towards #60635
In this change, we rework the AnalysisErrorListener deprecation to
better support users who have their own class that implements
AnalysisErrorListener. This change introduces a sealed supertype,
DiagnosticOrErrorListener, with the old implementation,
AnalysisErrorListener, and the new implementation, DiagnosticListener,
as its sole direct subclasses. Users who have implemented
AnalysisErrorListener should be able to instead implement
DiagnosticListener, and their class is an acceptable instance of
DiagnosticOrErrorListener, wherever that is needed.
In a breaking change we can drop AnalysisErrorListener and deprecate
DiagnosticOrErrorListener, and in the next breaking change, we can drop
DiagnosticOrErrorListener.
For reference, see the first API difference when deprecating AnalysisErrorListener and introducing DiagnosticListener: https://github.com/dart-lang/sdk/commit/903d77cc8229972a424941dcb7b7b79741e833eb#diff-dec15868961d7eadcd009f49d129bebcdb747aaa8dbfde5f5a08884e0cf11e32
Change-Id: I3ccf11d54b41fbca98d020d89978d250c16b4c04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436480
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-06-25 06:54:20 -07:00
Fedor Shcheglov
1dc17b9a22
Deprecate Element.nonSynthetic2, use nonSynthetic instead.
...
Change-Id: Ie47d5f1e1fbaa7473747c5b43333a9c0cd689f74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435664
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-06-20 08:57:19 -07:00
Sam Rawlins
97c49e7514
Deprecate errorCodeValues for diagnosticCodeValues
...
Work towards https://github.com/dart-lang/sdk/issues/60635
Change-Id: Ieea525a3f7260ea50e766feff0a0647fc0c33b4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/434526
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2025-06-16 16:18:15 -07:00
Sam Rawlins
69cd0ee5f6
analyzer: Deprecate "errorCode" parameters in Diagnostic constructors
...
Work towards https://github.com/dart-lang/sdk/issues/60635
Change-Id: Ifc173ec6e5924057fee3c420c8916f0abb257428
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/434141
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-06-11 14:19:09 -07:00
Sam Rawlins
f51d37e9b1
analyzer: Rename ErrorReporter to DiagnosticReporter
...
Work towards https://github.com/dart-lang/sdk/issues/60635
Change-Id: I84b095199773040fc0444364964654c4373a9d77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433740
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-06-10 12:24:34 -07:00
Sam Rawlins
903d77cc82
analyzer: Rename ErrorListener classes to DiagnosticListener
...
Work towards https://github.com/dart-lang/sdk/issues/60635
I tried to keep this minimal but still sensible:
* Rename AnalysisErrorListener and all subtypes to use 'Diagnostic'.
* Rename all instantiations of such classes if they previously
contained the word 'error'.
* Rename `RecordingDiagnosticListener.errors` to `.diagnostics`.
* Rename some _testing_ instance members that had the word 'error'
to instead use 'diagnostic'.
Change-Id: I3948e27ba28ac2494092e04f4e1d201a20cc1135
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433004
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2025-06-05 14:05:40 -07:00
Sam Rawlins
7a4c651eb3
analyzer: Rename 'errorCode' parameters in ErrorReporter
...
Work towards https://github.com/dart-lang/sdk/issues/60635
Change-Id: I4a3d320585967a4d2e8cbed430d2a67aa3f905fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430040
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2025-05-21 16:12:59 -07:00
Sam Rawlins
8a17ad9f05
analyzer: Deprecate AnalysisError in favor of Diagnostic
...
Work towards https://github.com/dart-lang/sdk/issues/60635
Change-Id: If9bbc96beed95129b099588c5bd9728afda8e392
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426902
Reviewed-by: Nate Bosch <nbosch@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2025-05-08 14:02:16 -07:00
Sam Rawlins
49562fd152
analyzer: Deprecate ErrorCode in favor of replacement: DiagnosticCode
...
Work towards https://github.com/dart-lang/sdk/issues/60635
Change-Id: I0cfc0bff4e5d10b7cb373f77de55fffc13b8cf76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426641
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-05-06 14:43:10 -07:00
Sam Rawlins
9ab2139df5
analyzer: Deprecate ErrorSeverity in favor of DiagnosticSeverity
...
Work towards https://github.com/dart-lang/sdk/issues/60635
Change-Id: Ic7f84584d4185e1ab7e8741052ec6694487c8c08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-05-05 13:58:32 -07:00
Sam Rawlins
57bfb6abd6
analyzer: Use new DiagnosticCode name in some directories
...
Work towards https://github.com/dart-lang/sdk/issues/60635
Change-Id: I942e690ab2946c564c10df228d17bd44de4ed375
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425406
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2025-05-02 11:02:20 -07:00
Sam Rawlins
23b3450c8e
analyzer: Make AnalysisError an alias for Diagnostic
...
Work towards https://github.com/dart-lang/sdk/issues/60635
Diagnostic has exactly one direct subclass, AnalysisError
(AnalysisError has a few more for tests). Diagnostic was previously
referenced only 7 times in all of analyzer.
This change is essentially a no-op.
Change-Id: I043970d96adcd7be4bb6a24d4a85b3f74309b7d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425682
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-05-01 10:08:05 -07:00
Sam Rawlins
24fbe71dd6
analyzer: Use DiagnosticCode instead of ErrorCode in tests
...
Change-Id: I6b70bda2e678777efdfde7c0cb9dca4ec85b27e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425686
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2025-05-01 09:18:03 -07:00
Sam Rawlins
35e8b9ba0b
analyzer: Deprecate ErrorType in favor of new name, DiagnosticType
...
Change-Id: I552e816de6d526e3476cac9dd3ee2919fc7ec499
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425720
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Kevin Moore <kevmoo@google.com >
2025-04-30 19:07:42 -07:00
Sam Rawlins
992cfb13bc
analyzer: Deprecate AnalysisError.correction; simplify other final fields
...
Work towards https://github.com/dart-lang/sdk/issues/60635
* `AnalysisError._contextMessages` unnecessarily backed the public
`contextMessages` getter; the field is final so it can be public
itself.
* `AnalysisError._correctionMessage` unnecessarily backed the public
`correctionMessage` getter; the field is final so it can be public
itself.
Change-Id: If269d4ed590ef7df81d9b9e3be03766601526d7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425620
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2025-04-30 16:06:19 -07:00
Sam Rawlins
cd07d191fc
analyzer: Make AnalysisError._problemMessage non-late and public
...
Work towards https://github.com/dart-lang/sdk/issues/60635
Change-Id: Id80912299c8bd9caafb9f6a9521168c74911f90d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425581
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-04-30 09:44:18 -07:00
Sam Rawlins
d1696f890d
CFE: Introduce type aliases for ErrorCode, ErrorSeverity, ErrorType
...
Work towards https://github.com/dart-lang/sdk/issues/60635
In this CL I only introduce the typedefs, update comments, and export
the typedefs. I don't change any references. Next we should update
internal references and maybe separately, any generated references.
Change-Id: I1c6d16580533b9283934261f56a6e5237e59109e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425343
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-04-29 16:19:30 -07:00
FMorschel
14c82024ea
[analyzer] Adds context message for three or more ambiguous extensions
...
Fixes https://github.com/dart-lang/sdk/issues/59542
Change-Id: Ie7ae97397878db86a38cc369d3c21d18a2a03efb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396540
Auto-Submit: Felipe Morschel <git@fmorschel.dev >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2025-04-29 11:39:38 -07:00
Konstantin Shcheglov
b2fdd8a345
Elements. Rename XyzElement2 into XyzElement.
...
The CL was done with rename + adding typedef for each class.
Change-Id: Ia25cc581d2e42cf7d12a85a3579af952d5c232ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424687
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2025-04-25 13:27:18 -07:00
Konstantin Shcheglov
49599e06cc
Elements. Deprecated element2.dart library.
...
Change-Id: I2be38df49e6f242d9fe59f34164549da4a0f41b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424683
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2025-04-25 11:23:18 -07:00
Konstantin Shcheglov
becd91df17
Format analyzer/ with tall mode.
...
Change-Id: I410cd1cf63fbf00b868bbb3e060433cad3ac9e6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423520
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2025-04-21 12:15:58 -07:00
Konstantin Shcheglov
67b9a1be74
Elements. Remove V1 Element used in scopes.
...
Change-Id: Ic4f838e9033942137b1d4a855d9d378bb2a1931f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423073
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-04-21 08:38:34 -07:00
Konstantin Shcheglov
0046ae8a46
Elements. Migrate lib/error/listener.dart
...
Change-Id: I22ce676d84ff95cf8de485bf2fc91e31f0c27807
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412983
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2025-03-03 10:02:20 -08:00
Konstantin Shcheglov
91f5aad129
Elements. Deprecate V1 APIs in dart/element/type.dart
...
Add InterfaceType.getGetter2() and getSetter2().
Change-Id: I9f32fff71a9b643cc9fd46f0aaa87233689a9660
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412940
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-02-28 14:18:59 -08:00
Konstantin Shcheglov
d333e264e8
Elements. Migrate InstantiatedExtensionWithMember and related.
...
Change-Id: I1f0648ff0f16387d81e5eea9d82d2d4efe0c6a9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405660
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2025-01-23 17:00:31 -08:00
Konstantin Shcheglov
8bbe6fbdfe
Elements. Report analyzer_use_new_elements without any txt file, add file ignores.
...
Change-Id: I13125f93a6633563ed6853a622bd9fec045bfc0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403923
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-01-10 15:20:59 -08:00
Konstantin Shcheglov
91db72c394
Elements. Migrate GetterSetterTypesVerifier.
...
Change-Id: Ia568507df7c7c02df6706d4ff42c4b9f489f479a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395044
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-11-14 02:50:23 +00:00
Sam Rawlins
998cd101b8
analyzer: Correct comment references in some source files
...
This corrects about 40 of 220 comment_references issues in the analyzer
package.
In correcting the `experimentStatusToStringList` function, I see that
it is unused.
Change-Id: I0c2ec602262121337e7305797596fac9df987973
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392243
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2024-10-29 21:38:34 +00:00
Konstantin Shcheglov
cf1f2e53a3
Breaking changes for analyzer version 7.0.0
...
Change-Id: Id6e329c7665d1dca1920d744dd7d0e9722da768c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311461
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-10-21 21:32:28 +00:00
Sam Rawlins
9baaa5f141
Reland "analyzer: Write out qualified extension names in error messages"
...
This is a reland of commit 10c1d883df
This includes a fix in listener.dart to not null-assert on an
element's name (`element.name!`). This fixes a problem in google
internal code.
Original change's description:
> analyzer: Write out qualified extension names in error messages
>
> Fixes https://github.com/dart-lang/sdk/issues/56269
>
> Change-Id: I025966fd4aa3d7c5b71175321f21f95e8c41f086
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388580
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
> Commit-Queue: Samuel Rawlins <srawlins@google.com >
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Change-Id: I6c20cf023af26b2d3b0fe9d8193f5e067719da8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389587
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2024-10-11 20:08:31 +00:00
Alexander Thomas
d4aa30a3ba
Revert "analyzer: Write out qualified extension names in error messages"
...
This reverts commit 10c1d883df .
Reason for revert: g/dart-sdk-rolls/MOLCzv4S-kQ
Original change's description:
> analyzer: Write out qualified extension names in error messages
>
> Fixes https://github.com/dart-lang/sdk/issues/56269
>
> Change-Id: I025966fd4aa3d7c5b71175321f21f95e8c41f086
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388580
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
> Commit-Queue: Samuel Rawlins <srawlins@google.com >
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Change-Id: I613695e90c96e5ffdb4dc56e729dc34be385f5fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388823
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Alexander Thomas <athom@google.com >
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Alexander Thomas <athom@google.com >
2024-10-08 15:07:38 +00:00
Sam Rawlins
10c1d883df
analyzer: Write out qualified extension names in error messages
...
Fixes https://github.com/dart-lang/sdk/issues/56269
Change-Id: I025966fd4aa3d7c5b71175321f21f95e8c41f086
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388580
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-10-07 18:01:54 +00:00
Konstantin Shcheglov
e41b531a59
CQ. Deprecate 'reportErrorForName', use 'atConstructorDeclaration' instead.
...
Change-Id: Ife3cdfd53551f12aa1b0dc6a223ae91e248ed33e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383444
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-09-03 20:22:37 +00:00
Konstantin Shcheglov
30b3f9d0a6
CQ. Deprecate 'reportErrorForSpan', use 'atSourceSpan' instead.
...
Change-Id: I4324154842ec462acbdda49e09d1a74f147c56f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383443
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
2024-09-03 20:14:34 +00:00
Sam Rawlins
0e39ed67e6
analyzer: Expose LintCode as public API, for plugins
...
Work towards https://github.com/dart-lang/sdk/issues/50986
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ie5783240e3fc2c9f8076b3efb13f79a3b8fa5000
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/375060
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2024-07-09 22:16:00 +00:00
Konstantin Shcheglov
b4e30d1b45
CQ. Deprecate unused static members of AnalysisError.
...
Change-Id: I46e76defbc9a833a867cc3fa2154635f71a6d085
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371422
Reviewed-by: Sam Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-06-13 23:39:21 +00:00
Konstantin Shcheglov
31a4bb7f60
DevX. Issue 22915. Show instantiated type alias in diagnostics.
...
Bug: https://github.com/dart-lang/sdk/issues/22915
Change-Id: I733bcb6021a167825840027df371fd22cfc71ce3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370701
Reviewed-by: Sam Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-06-10 21:19:08 +00:00
Sam Rawlins
cf9a8bb532
analyzer: Move DartLinter to linter package's 'test_utilities'
...
And rename it to TestLinter.
We also get to remove `LintRule._locationInfo`,which was _only_ used
for testing pubspec-oriented rules.
This DartLinter class is only used in tests and tools of the linter
package, so it's good to move it out of analyzer lib/.
In order to remove `LintRule._locationInfo`, we move the singular
package_names test case to be a reflective test.
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I97b5e79daa07eb3942f5444502473a4ec1e9daf0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369562
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2024-06-04 17:13:49 +00:00
Konstantin Shcheglov
4f6cca1e1e
CQ. Extract package:analyzer/error/error.dart library cycle.
...
By removing unnecessary references to higher level libraries we
can extract a separate 19 libraries cycle, related to errors. Maybe
later we can break it further.
This reduces the mono-cycle from 295 to 270 libraries.
Change-Id: Id9db12002dba10788b65262d3d7325ad6079ceff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-05-31 20:22:28 +00:00
Konstantin Shcheglov
053fcb92c7
CQ. Make atEntity() consistent - use required target and 'errorCode' formal parameters.
...
Change-Id: I17defde653f41e83c0ff054a4a498a0dacaccd08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366887
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
2024-05-17 00:12:23 +00:00
Paul Berry
261e1181be
Stop creating synthetic identifiers to use as error nodes.
...
By changing the type of error nodes to SyntacticEntity, we can use
Token objects directly as error nodes, rather than having to wrap them
in synthetic identifiers.
Change-Id: I29c2fec7007766b8bc6103da835093ea326e939b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366420
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-05-14 21:01:11 +00:00
Konstantin Shcheglov
f9d4df6331
CQ. Enable avoid_redundant_argument_values in analyzer/
...
Change-Id: I8e5f5f6629249d1fdfddcfe87d20680b37198765
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353804
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2024-02-26 19:55:13 +00:00
Konstantin Shcheglov
bd38fbada4
CQ. ErrorReporter, use atOffset() instead of reportErrorForOffset()
...
Change-Id: I506f71d1e7aa95f1c62fca1746e4a86c78720336
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353782
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
2024-02-22 19:51:39 +00:00
Konstantin Shcheglov
106db0d7b4
CQ. ErrorReporter, use atElement() instead of reportErrorForElement()
...
Change-Id: Ife5f6d04ee7c15e7703db3ad81eb7707c7f00ceb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352053
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-02-13 17:16:07 +00:00
Konstantin Shcheglov
14a1045f16
Legacy. Deprecate 'withNullability' in getDisplayString() methods.
...
Change-Id: I688f230f4189cd1fc600e4d34f07f339111c382d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350645
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-02-07 01:25:38 +00:00
Konstantin Shcheglov
9cca4a1c5e
ErrorReporter. Use 'contextMessages' name.
...
This parameter used to be positional, so name did not matter.
But now it dos.
Change-Id: I1c76c2a3958523299ff9361d299fa449eace9441
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350161
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-02-05 17:24:28 +00:00
Konstantin Shcheglov
2a88162b84
ErrorReporter. Use atNode() instead of reportErrorForNode().
...
Change-Id: I118fb7623d3effc3bf4bebdeb586196659e8da88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349630
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-02-02 01:56:59 +00:00
Konstantin Shcheglov
79cd9a6655
ErrorReporter. Add atToken(), atOffset(), atNode(); use atToken()
...
We discussed this some time ago, and I found another place where
I would like to report at a `SyntacticEntity`. So, if I'm going to
add something, I can just as well make `ErrorReporter` better.
Change-Id: I46d99e8959c7a5fd700cc2cba775114bfefec04d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349709
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-02-01 22:32:27 +00:00
Konstantin Shcheglov
3ea570739d
Legacy. Deprecate 'isNonNullableByDefault' in ErrorReporter constructor.
...
Change-Id: Ia05e113115fb29b47ba12fc9bf46c1d4c04721b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349463
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-02-01 01:51:48 +00:00
pq
fe6950eceb
enable flutter_style_todos
...
Change-Id: Ic82963b754404d54e37f5fb03819aebc3fa67954
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336502
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2023-11-15 23:04:19 +00:00