Commit graph

68 commits

Author SHA1 Message Date
Brian Wilkerson c47df4ce20 Move linter to use shared mock packages for some packages
In particular, this makes it use the mock versions of 'flutter' and
'meta'. The other mock packages it uses aren't yet in the shared
support. I'll add support for them and move the linter over in a future
CL, then in later CLs I'll look at moving the analyzer and
analysis_server packages to the shared versions.

Change-Id: Ib0e272b48332278acf9dcfd4e4d0fc59ba9d29b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371947
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Sam Rawlins <srawlins@google.com>
2024-06-18 20:31:30 +00:00
Sam Rawlins e04c53d5ac meta: add TargetKind to @factory
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I5c0608637f2feb9986e890f3c83cf02884bef7f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369789
Commit-Queue: Sam Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-06 15:39:56 +00:00
Sam Rawlins 8029fdf79a meta: Add a TargetKind for _Sealed
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ibac1f71f6cbb9432150b49b8565bf740efa1be32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369765
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Sam Rawlins <srawlins@google.com>
2024-06-05 20:28:57 +00:00
Sam Rawlins a451edf978 meta: Use TargetKind.overridableMember on MustBeOverridden
Change-Id: I6f19eeac5efac2c56eabecd32bc6e2032d1ba764
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369526
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-06-04 17:29:09 +00:00
Sam Rawlins 28be4efd8f meta: require that @mustCallSuper only annotates overridable members.
Previously, this behavior was custom-wired into the Dart analyzer, but
now it is specified with TargetKinds.

In the analyzer we remove special annotation-target-verification for
`mustCallSuper`.

Change-Id: Ibd3ada0a612069c5286facffaad557671c7a85b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-05-31 21:41:43 +00:00
Sam Rawlins 500a8c0a72 linter: Make some allowances in avoid_catches_without_on_clauses
Fixes https://github.com/dart-lang/linter/issues/3023

This fix is a little unusually large because I have to add some
elements to both the mock flutter package, and the mock SDK. This
affects some completion tests.

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I44b68754f756cfe1cf99518957d74c4af56043f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-05-28 18:36:58 +00:00
Sam Rawlins 97d4d12dc0 meta: Add TargetKinds for @immutable; narrow error range for "invalid annotation" warnings.
This change looks big, and this is because we change the range of all
of the "INVALID_x_ANNOTATION" from the whole annotation (like
`@Immutable("...")`) to just the annotation identifier (like
`Immutable`). This affects many tests.

The error range is changed so that we can consistently use the
`RemoveAnnotation` fix to fix these warnings; it just needs a
consistent error node, so that it can find the Annotation node above.

All this to support `TargetKind`s for `@immutable`, so that we can
remove the custom "INVALID_IMMUTABLE_ANNOTATION" message.

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ifd64e154986b6cbcbafeb9420ca8d0949653e618
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367881
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-28 18:28:49 +00:00
Sam Rawlins 0d5830e541 meta: Support @doNotStore on constructors and mixins
There were no tests of this component of the annotation's description:

> The annotation can also be applied to a class to implicitly
> annotate all of the valid members of the class

So I add those as well.

Bug: https://github.com/dart-lang/sdk/issues/48476
Change-Id: If5f0f4c6057f57b4dfd01d8f648110d69fbc5eb4
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-05-23 16:26:39 +00:00
Danny Tuppeny 0f05924297 [analysis_server] Remove redundant solo_test tests
Checking for solo tests is now done as part of `verify_tests_test.dart` so solo tests currently produce two test failures.

This file did check one additional project that doesn't have `verify_tests_test.dart` does not (analyzer_cli) so it isn't exactly the same, but that project is going away (https://github.com/dart-lang/sdk/issues/48457) so it doesn't seem worth making `verify_tests_test` work there (there's a mismatch because it currently uses `all.dart` and not `test_all.dart`, but I suspect that filename may be coded into some bot configuration somewhere).

Change-Id: I7431ed0e141bab1898860f6fbe316833281d6fa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-05-22 16:34:31 +00:00
Sam Rawlins 1bfae529f7 meta: Sort TargetKinds
Change-Id: I9ecc0ac8050bdac6dd61b8e67e889a57cb0a0fec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365622
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-08 18:30:19 +00:00
Sam Rawlins e07cd16950 analyzer: bump mock meta package
I did not automate this; I just copied, pasted, and then removed all
of the comments. It uncovered a bug in a test.

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try
Change-Id: I5f7591fc53f8137f8c4d5d0d900a6663e8b4d74e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/362842
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-04-16 01:07:39 +00:00
Brian Wilkerson bb77a39445 Add documentation for lints in the flutter rule set
The tests don't currently pass because the test framework doesn't allow
the use of the 'flutter' package. I have partial support for enabling
this, and an idea for a better solution.

What I need most is verification that the examples and fixes are
reasonable. I'm not as familiar with the more flutter-specific lints,
so I might be off-base on some of them. Of course, any other comments
are also welcome.

Change-Id: I73c8c0565ba262c88f8e363f59aef8bc749894a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359700
Reviewed-by: Marya Belanger <mbelanger@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-04-09 17:23:14 +00:00
Brian Wilkerson acb94a7da4 Move the mock package support to analyzer_utilities
Change-Id: I9d0a2d9e3e85d147ce7c7d0c14ea6c179c6f70de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/359740
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-04-01 17:04:06 +00:00
pq cde2b1acf9 final -> var for analyzer_utilities
As per, https://github.com/dart-lang/sdk/blob/main/pkg/analyzer/doc/implementation/coding_style.md#local-variables



Change-Id: Ib286a522351460abeca228fabc3b3bc6c57e3421
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346081
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-12 22:29:37 +00:00
Chingjun Lau 4f93e8f093 Use TEST_SRCDIR instead of RUNFILES to access the test files.
The RUNFILES environment variable is an implementation detail of the
internal build rule, while TEST_SRCDIR is set by bazel. In practice,
they are pointed to the same directory.

See go/lsc-dart-runfiles for context.

R=srawlins@google.com

Change-Id: I2f7ea1aef7ff4ce2209d001eb89054e86abf22d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344342
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Chingjun Lau <chingjun@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-01-02 21:45:53 +00:00
Konstantin Shcheglov b22025d5c3 Macro. Fix for 'add constructor', 'augment constructor' sequence.
Change-Id: If9a5a07cefc7dcd782db636ada2dfa02d7b26e4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339044
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-11-30 01:56:14 +00:00
Devon Carew 6917656134 [pkg] remove duplicate config from the analysis options files
Change-Id: I149a97bbe260600a3de664b28c4d212dd9adb889
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335862
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-11-14 00:37:53 +00:00
pq f962700302 + flutter_style_todos
Enabled `flutter_style_todos` in analyzer packages:

* `analyzer_cli`
* `analyzer_plugin`
* `analyzer_utilities`
* `meta`


Change-Id: I5fcd76bfa5a3bdeb14d6a81b8193129c6d83d0e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335405
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-13 00:14:09 +00:00
Parker Lougheed 9b34c52aef Update analyzer_utilties to Dart 3 and enable more lints
All the packages that depend on it now have constraints greater or equal to 3.0.0.

The added linter rules are taken from other analyzer packages.

Change-Id: If51f9209dab9c58525a1207534bccb6491a409c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325904
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-09-14 20:27:26 +00:00
Danny Tuppeny c739cbfd7b [analysis_server] Fix generation tests on Windows
The check normalises newlines from "actualContents", but "expectedContents" could also contain \r\n on Windows (at least it does for me), so this just normalises both.

The additional await/async is to prevent "Test failed after it already completed" warnings because this code is inside the call to test() (and not wrapping it, like the other .main() calls in the file).

Change-Id: Iac034efaf1a8a6dad4a21dc67a2dfdb74092dd22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-04 19:18:51 +00:00
Danny Tuppeny 605e89d3bd [analyzer_utilities] Find pkg folder from working directory
When running tests from analysis_server using "dart test", the Platform.script is a temporary file and this code fails like:

```
00:01 +0 -1: FlutterSnippetCompletionWithoutNullSafetyTest | test_snippets_flutterStateless_notAvailable_notTopLevel [E]
  Bad state: Unable to find sdk/pkg/ in /var/folders/b1/ftm2whhj4mb3_c4nfjhq23z00000gn/T/dart_test.kernel.VYZHoV/test.dart_1.dill
```

This change allows using the working directory to find `pkg` if all of the previous attempts fail, before giving up.

Change-Id: Idb29029e6f14ec4bab3569018771ed0e10586ecc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-02 18:24:00 +00:00
Konstantin Shcheglov 97a762b083 Remove debug output from analysis_server/ tests.
Change-Id: Ia358d4f51c605ca66e5111769d1f716559251f63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298780
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-26 19:58:48 +00:00
Konstantin Shcheglov 04c1d58a4a Use mixins for analyzer packages, to prepate for language 3.0
Change-Id: I28fb5cf51c5dae887f19613d874d1ff264954be0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290912
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-03-23 23:57:53 +00:00
Sam Rawlins 49a3fb4f96 [analyzer] Separate the HTML parser utility from the DOM
With the parser code in the same library as the DOM classes, the
`pkg/analyzer/tool/messages/generate.dart` program, which generates all
of the diagnostic classes and diagnostics, _depends_ on a library
with a `parse` method which depends on these diagnostic classes (in
order to report errors while parsing HTML). This means that if
there is any existing error (like an unknown identifier) in the
existing error codes, it is impossible to generate the error codes.

Since we don't need the `parse` method to generate diagnostics, we
split up the library and remove the indirect dependency.

Separating the parser code out removes the loop.

Change-Id: Ifb9e9fd979e341ae64a1ed49aaf3758d3dcf1dee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-03-08 03:06:19 +00:00
Brian Wilkerson c021746bc4 Automate checking for solo tests
Change-Id: Iba0134f4b31b64d3bf3eb622c57d0e40121494f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286944
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-03-06 22:53:37 +00:00
pq ad2da86f18 linter 1.33.0 rc
Some notes.

* There are a number of tests that should get decoupled from the linter being pulled into `DEPS`.  Instead of depending on the state of lints there, we should update the tests instead to use a more hermetic environment.  (See for example `options_rule_validator_test.dart` for how that might look.)


Downstream (blocking) fixes:

* https://github.com/flutter/flutter/pull/119736
* https://github.com/flutter/gallery/pull/878


Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280054
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2023-02-07 20:56:35 +00:00
Brian Wilkerson d9482e35ce Remove some unnecessary ignore comments in analyzer packages
Change-Id: I578285132f0d3f200cb2e9069750a1391940711d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274721
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-09 21:33:18 +00:00
Sam Rawlins eaff33f439 analyzer_utilities: tidy static analysis
* Stop using `implicit-casts: false`
* Don't list rules which are found in package:lints
* Fix strict-inference issues

Change-Id: Ibe350548e3d6bef486ef2ef82430cda23d684baf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271780
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-11-28 18:11:03 +00:00
Sam Rawlins 5f8ef7be53 Enable new linter rules in analyzer packages
Change-Id: Id0182648a347a05cbf6e1483a0afe94219268853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271000
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-11-21 23:02:38 +00:00
Konstantin Shcheglov dd63e54e2c Remove fluent check().
Change-Id: I6f41efb2432ebd4a6a03638d5db0937f20386200
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261440
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-27 19:15:55 +00:00
Ahmed Ashour 5fe480b788 Fix typos
Fix #49864

TEST=ci

Change-Id: I9a7e06d604cd0b4f56f2ac229ab3fc9f01cb9d76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256824
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-09-16 19:35:00 +00:00
Devon Carew cb5b66f694 [analysis_server] minor cleanups to analysis server spec generation
Change-Id: I9fd780fb627eaab24731d426e5a0f51b9608f189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249734
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-27 17:21:02 +00:00
Devon Carew 057d0baaf9 Add a lightweight parser for the analyzer spec (remove sdk deps on package:html).
Change-Id: Ia8776c8aea845a7dde089d5ac9f3dab82e984f4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249721
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-25 00:34:40 +00:00
Konstantin Shcheglov aa0d0c56cb Make Cache.get() just return the value.
Change-Id: I816a1c28569011215ad6cba9a7559513a7900386
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246880
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-02 15:45:45 +00:00
Konstantin Shcheglov 8ded7af5f5 Add LibraryOrAugmentationFileKind.exports/imports
These will replace eventually FileState.exported/importedFiles,
because only libraries or augmentation can have them. Also, we will
build Export/ImportElement(s) from them, when google3 switches to
using AnalysisDriver.buildPackageBundle(), so we are free to make
changes to the way linker works.

Change-Id: I66674dc7720aa704cfc36d16fc78e17dd05a8b93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246681
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-01 06:35:14 +00:00
Devon Carew f7c46f145c [pkg] prefer 'any' deps for package dev dependencies
Tested: CI validation
Change-Id: If65cc156130a65ffe00c6f1660ac320e2921afae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246053
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-05-27 01:34:59 +00:00
Ahmed Ashour 466202bb34 [analyzer] remove lints ignore in generated files
Fixes #49039

Change-Id: I14e98fc5ab9c1f7b7e69f99dc1c97178b56c624d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245020
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-05-19 05:17:00 +00:00
Nate Bosch 6ebd2633cd Use any deps for all unpublished packages
It should not be necessary to ever run `pub get` for a package which is
not published. All packages used in the SDK are controlled by a single
package config, so it's not necessary to declare versions or paths for
any packages.

Remove all dependency overrides.

R=devoncarew@google.com

Change-Id: Icb328813b471f35ee4c99995f4e90aac4d8ed438
Tested: Covered by existing static analysis.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244767
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2022-05-17 01:22:25 +00:00
Sam Rawlins 531e6e175f analyzer: Prefer string interpolations
ignore prefer_interpolation_to_compose_strings and
constant_identifier_names in generated files.

Change-Id: I963504e298f8e439734522fed9ac09911750f419
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243646
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-05-04 20:45:25 +00:00
Konstantin Shcheglov 76387a9c5b Support for google3 locations in 'packageRoot' and KernelCompilationService.
Change-Id: I90910bc3c966f648ade107d10d4c7f593c67c7a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242162
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-25 19:46:13 +00:00
Devon Carew 9637ef7205 Move pkg/analyzer_utilities to package:lints
Change-Id: I1ff5a123065f6b500cfc4cb12ce5dfd387c6cfaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240912
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-04-14 22:31:04 +00:00
Konstantin Shcheglov 3d69c3c0c4 Restore sync file methods in AnalysisSession.
There are clients, like `built_value` that cannot be updated.

Change-Id: I27371018039f22cd7ca2cb82b30ec33469aa6e4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238002
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-21 23:27:57 +00:00
Konstantin Shcheglov 0b7b70b758 Deprecate synchronous methods in AnalysisSession.
Change-Id: I9bd3bf2d3d6dbc74ffefde1c06f83e9200b0f552
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2022-03-07 18:17:41 +00:00
Alexander Thomas 30beab0f43 [infra] Add OWNERS to the Dart SDK
* Add team "groups" in tools/OWNERS_<group name>.
* Add top-level OWNERS as a fallback.
* Add OWNERS for all top-level directories.
* Add OWNERS to all packages.

For additional background information see go/dart-sdk-owners.

TEST=No op until code-owners is enabled.
Bug: b/200915407
Change-Id: I7fe6116cc599c749cd50ca16151d6d6a801d99d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229147
Reviewed-by: Jonas Termansen <sortie@google.com>
2022-02-14 14:06:34 +00:00
Konstantin Shcheglov 44698e8c62 Add includesAllInOrder() check.
Change-Id: Iaf35dfc49119df58b7d5789bdf60afb0bfefcb18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-28 04:28:31 +00:00
Konstantin Shcheglov 601fecb36a Use use check() for the new completion request suggestion tests.
Change-Id: Ied03c89b0a898f16739be5e669f1602355ef3a6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227423
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-11 16:31:24 +00:00
Konstantin Shcheglov 2f222990dc Rewrite remaining named argument tests to checks.
Change-Id: Iedab51f44bf17512f5aa7d7270a5f7f880cba90c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-01-05 22:16:51 +00:00
Konstantin Shcheglov 996eb0583a Rewrite ArgListContributorTest tests that call _tryParametersArguments() using check().
Specifically, to include replacement ranges, which we did not test
consistently, and to merge all check that we have into one matcher
instead of having two limited methods looking for suggestions.

I started initially looking at https://github.com/dart-lang/sdk/issues/34672,
and realized that it is somewhat scary to make more invasive changes
without checks for replacement ranges.

Change-Id: I303cd066989f2a137013ac8dac0614b24e52071d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225800
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2021-12-29 19:15:18 +00:00
Konstantin Shcheglov 5738ab2eb6 Sort extension members.
Change-Id: I7538ea08fe414c3fc6ad69bafb4e665214003d30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224960
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-20 18:35:03 +00:00
Konstantin Shcheglov e3e44ea410 Add which() for multi checks.
Change-Id: I07dff9db3c7870b8799477d949b23a45ba689130
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223920
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-14 19:31:35 +00:00