Commit Graph

4 Commits

Author SHA1 Message Date
Sam Rawlins af7d2a4824 analyzer: code quality improvements in task/options.dart
* Add quotedAndCommaSeparatedWithAnd getter to List<String> extension.
  This extension getter allows multiple fields to be initialized in
  ctor initializers.
* Make all ErrorBuilder fields private which enabled analysis that all
  could also be final.
* Refactor ErrorBuilder.code to not be `late final` by using a private
  constructor and a factory constructor.
* Refactor TopLevelOptionValidator _valueProposal and _warningCode to
  not be `late final` by initializing them in ctor initializers.
* Remove the TrueOrFalseValueErrorBuilder class. The class contained
  no useful information and was basically a wrapper around
  `reporter.reportErrorForSpan`. Calling this inline simplifies.
* Change reference in parser.dart as Analysis Server renamed it to
  [_builder] when I refactored one of the fields in options.dart.

Change-Id: Ica867772fca5d3442ab754e588ec07829a822c2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191462
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-03-17 16:59:14 +00:00
Brian Wilkerson d5088c0a8f Reland the CL to "Add a hint for the new Target annotation".
This reverts commit 50946855dc.

The bug that caused dartdoc to fail has been fixed by restoring the
creation of the invalid field. An issue has been created to update the
dartdoc package to stop using the invalid field, and the field will
need to be removed after dartdoc has been updated and pulled into the
SDK.

Change-Id: Ia7e282972e541a33b379872fbcd57a137a9c8a25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-25 16:53:10 +00:00
David Morgan 50946855dc Revert "Add a hint for the new Target annotation"
This reverts commit 351a1cc489.

Reason for revert: caused a generator to fail, b/166257389

Original change's description:
> Add a hint for the new Target annotation
> 
> Change-Id: I5d8723eead20bb68407ce2a23e8de6cb9ae8a4de
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159921
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>

TBR=scheglov@google.com,brianwilkerson@google.com

Change-Id: I16af4403867d31f731d1efafce2c0c2be405df9c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160102
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-08-25 14:20:52 +00:00
Brian Wilkerson 351a1cc489 Add a hint for the new Target annotation
Change-Id: I5d8723eead20bb68407ce2a23e8de6cb9ae8a4de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159921
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-24 18:04:47 +00:00