Commit Graph

463 Commits

Author SHA1 Message Date
Konstantin Shcheglov e97f1bdbf0 Switch analysis_server to language 2.12, so null safety, but opt-out files.
This should allow doing partial migration, specifically protocol files,
which are imported by other libraries, but are a small library cycle
that does not import much outside of it.

Change-Id: I904c05d6d5b444ee9a9dbd1f7ada12aabdcc5165
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-30 23:39:37 +00:00
Brian Wilkerson d00ef8611a Update the server protocol to support passing back the line and column numbers for the end of a range
Change-Id: I8310e4a32cacbe98310c1dbaa3b3563b1ff1a1ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191862
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-18 19:22:23 +00:00
Danny Tuppeny 78dd7a4bb3 [analyzer] Suggest arg names in front of positionals
Fixes https://github.com/dart-lang/sdk/issues/40654.

Change-Id: I329d8b4af9371e8d61c4044bb003f9c22cd72c41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182783
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-04 18:21:19 +00:00
Parker Lougheed 5ef1dcdcab [Analysis Server] Update font inclusions for API doc
Some of the weights we used were missing causing blurry text. I've also switched from Source Code Pro to Roboto Mono to be consistent with other Dart websites.

While not related I also updated the semver link to https.

Change-Id: Ifc4a10a05d795134caade2081045517426c21fc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-02-20 16:48:56 +00:00
Konstantin Shcheglov 5c426d8d43 Add Element.aliasedType to the protocol.
R=brianwilkerson@google.com

Change-Id: I95fb2c9d50096f90913c4d6670ce0841095fe6a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181443
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-27 23:27:21 +00:00
Nate Bosch 6e1a0b08c7 Update to null safe package:html
Change-Id: I667efbe0f895628130bc695e96a7f95a991c2e9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181040
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2021-01-27 18:41:10 +00:00
Konstantin Shcheglov 40b9650b67 Add ElementKind.TYPE_ALIAS and HighlightRegionType.TYPE_ALIAS to the protocol.
Change-Id: Ia4991d4f657f4bfa5e244d9c3b126e89571b9e7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180660
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-25 18:42:03 +00:00
Brian Wilkerson a00530b46f Remove unused support for requesting token details
Change-Id: I9cc160d84e06b4b7be67e53962fe38c1430e74b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180762
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-24 05:11:48 +00:00
Danny Tuppeny b94adb2bc2 [Analyzer] Add folding regions for comment blocks
Change-Id: Iafe70e977065dc68230503349b8ba3abe9b4c0c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179777
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-20 16:23:45 +00:00
Brian Wilkerson 3621c6a02f Add a flag to the bulk fix protocol to support testing
I think it makes more sense for the server to read the config file than
for `dart fix` to read it and then pass the data to server as part of
the protocol, which it would effectively need to be parsed a second time.

But I don't want config files to be used outside of test mode, so I
added the flag to the protocol. Let me know if you can think of a better
approach.

Change-Id: I1c53bc995272451247e84914f2cd6b75a837ee1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180082
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-19 23:16:14 +00:00
Danny Tuppeny c5129a2b12 [Analyzer] Increase version to 1.32.1 and add changelog section
Fixes https://github.com/dart-lang/sdk/issues/42572

Change-Id: I6d3776b663f8485bf7df4119e68085b275b584bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174803
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-12-03 17:39:03 +00:00
Danny Tuppeny a0cc6c9819 [Analyzer] Add a new CompletionSuggestionKind for Pub package names
Change-Id: I73fad5c793249a8ee0e30c1ce198b5adf7ff429a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174128
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-27 17:38:16 +00:00
pq 29a9fe27d2 bulk fix details server protocol
Change-Id: Id96fd8508018159959448c383baa53ad69b5828f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172621
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-17 21:45:28 +00:00
Paul Berry 7d3bc4862d Rename pkg/analysis_tool to pkg/analyzer_utilities.
It's no longer just for the tools in the `tool` directory; it also
contains test utilities for use by the analyzer and related packages.

Change-Id: I0f8cf57f24ea7aad8e2177e43ee2bcb2ab3030da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171704
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-13 17:46:30 +00:00
Devon Carew 2f9cb8e81b Remove support for v1 of analysis highlighting.
Change-Id: I65bc645de9565628d82d1ff969616f3e38582275
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171682
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-12 18:36:19 +00:00
Danny Tuppeny 8b567447dc [Analyzer] Use new NAMED_REQUIRED ParameterKind for signature help
Change-Id: Ia4d23cb51f4e3729e8d40fa5a38dd8b2a8771c03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162006
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-29 07:38:14 +00:00
Danny Tuppeny c2e8d1df06 [Analyzer] Return GET_FIXES_INVALID_FILE for getFixes requests for files outside roots
Bug: https://github.com/dart-lang/sdk/issues/43521
Change-Id: I250bca1131b3d8bc7f8232db82f7f03008b3db48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164088
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-09-23 14:00:32 +00:00
Danny Tuppeny 5112f526cf [Analyzer] Add optional support for codeOffset/codeLength on navigation targets
Change-Id: Ib328c408d590398d30bd341603781f68f2fd1402
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161166
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-02 20:51:27 +00:00
pq 3d5df93fb1 bulk fix protocol
Change-Id: Id8505d5ad6f0f3d1c5289ab12d4932c6174f72e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153623
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-07-10 14:20:07 +00:00
Danny Tuppeny 7f8ec737db Add a note to docs about enumerations being extended
Change-Id: Ia5d6017018b812777b35641c2ee5a4bca9aa9501
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151527
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-06-17 19:32:50 +00:00
Danny Tuppeny f0e1f32c87 Add support for folding if/else/elseif blocks
Change-Id: I3cbf1f282ee59c577c6ba912e957f838e827fd3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-06-17 19:32:50 +00:00
Konstantin Shcheglov a56368926e Remove support for 'packageRoots' in DAS.
Bug: https://github.com/dart-lang/sdk/issues/41197
Change-Id: I61929a5853b4e353e3a758fe5088f2ff2c1fda2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-28 22:57:32 +00:00
Kevin Moore 0acc564104 Fix a number of URIs referring to dartlang.org
Change-Id: Ie1373e93092023caf5e0bcfd6bb88bfb422d5daf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2020-05-13 18:24:12 +00:00
Brian Wilkerson 4e9ffc5a0d Remove the experimental flag from closing labels
I think it's safe to remove the experimental status at this point.

Change-Id: I3a992e7134633d1e9de0bba0f1a3d2ff357fd8b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142884
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-09 16:51:19 +00:00
Brian Wilkerson 93313eb244 Enable omit_loval_variable_types in analysis_server_client
Change-Id: I21271bfc6b2b7949fcafc5f91f23f8364697bcfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141580
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-30 03:59:07 +00:00
Brian Wilkerson 8969b1839c Enable omit_local_variable_types in analysis_server
Change-Id: I7e5c13d40fd276854601681fc84be321e6031b10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141583
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-30 03:58:44 +00:00
Konstantin Shcheglov 51f5636daf Report FLUTTER_GET_WIDGET_DESCRIPTION_CONTENT_MODIFIED when a file is changed during the request.
R=brianwilkerson@google.com

Change-Id: I9d77df28dd16fdaf30ba4dd04fe8cfff221c236d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139144
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-12 01:09:00 +00:00
Brian Wilkerson e75c9192a1 Start converting dartdoc style in analysis_server
Change-Id: I013659a0f34dafce4c091dc534e2ab8ef0469217
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135491
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-13 15:00:03 +00:00
Brian Wilkerson bff11ba6ec Enable always_declare_return_types in analysis_server
Change-Id: I9b06753cf552c9f50ea2abd7f3fa5ba9adecb526
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134085
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-31 17:45:24 +00:00
Brian Wilkerson 0d3571b52f Add return types to more methods in analysis_server
Change-Id: Ib61c92d65e6170a1b5cd3e3d24affb3a3fa16bb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133760
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-29 20:18:20 +00:00
Brian Wilkerson 9609975262 Update generators to not produce type annotations for variable declarations
Change-Id: Ia19c94b430192c606d12449011503d5ca8172feb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133380
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-25 16:31:15 +00:00
Brian Wilkerson 9918987c59 Enable prefer_if_null_operators and prefer_spread_collections in analysis_server
Change-Id: I14fa2e9a3196be1d5f5d7991104e7363c72b3fe9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133334
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-25 16:31:07 +00:00
Brian Wilkerson 3d7dd5bfe0 Remove the notion of required fixes from dartfix and the server
Change-Id: I55389e1978d11820142961b5997d2187d1e61bae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132973
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2020-01-24 01:05:41 +00:00
Brian Wilkerson 5584c96fde Enable prefer_single_quotes in analysis_server
All of the changes except in the analysis options file are from dartfix.

Change-Id: Icd9bf02ad07f71d1fc365979c7dfe18a792dc595
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132624
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-21 17:52:52 +00:00
Brian Wilkerson 7070347bbb Generate single quoted strings where possible
Change-Id: I27546bbfb85f78021e515d00c2531b83b47fc71f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132480
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-20 21:52:34 +00:00
Brian Wilkerson 93ebbe2c7a Enable use_function_type_syntax_for_parameters in analysis_server
Change-Id: I93cddc986c23e53557c647befc92d118b3d6ed43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132459
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-19 17:11:11 +00:00
Brian Wilkerson 5b1065ac60 Enable avoid_init_to_null in analysis_server
Change-Id: I1909b0d8939d9b436fce772bd97dc4835f1093ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131322
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-13 00:35:34 +00:00
Brian Wilkerson 32ce9c7872 Enable prefer_collection_literals in three packages
Other than the following changes, all of the changes were made by dartfix:
- the analysis options files
- one line to enable the fix through dartfix (missed in an earlier CL)
- three places where a bug in the fix produced invalid code (issue and fix TBD)

Change-Id: If8660700792561805f4d1c96ccecd81abcebfeb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131209
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-11 20:39:02 +00:00
Brian Wilkerson e5705943d8 Enable prefer_conditional_assignment in several packages
Other than the changes to the code generators and the analysis options
files, the changes were all generated by dartfix.

Change-Id: I80055e3992452c5b40eed41ac79807cf5c932976
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-06 05:19:19 +00:00
Brian Wilkerson fbadd6a832 Enable prefer_equal_for_default_value in several packages
Other than the changes to the code generators and analysis options files,
all of these changes were produced using dartfix.

Change-Id: I24f47b9f6b929b0b5d5e08da7ef2016f4bdc4108
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-05 20:59:19 +00:00
Brian Wilkerson c08cdb5a78 Enable avoid_return_types_on_setters in analysis_server_client
All changes (other than analysis_options.yaml and the change to the generator) made via dartfix.

Change-Id: I7b186371e22048ceddf6fd4407a66aba8b96480c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130003
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-02 04:55:38 +00:00
Brian Wilkerson 91d6e1a0a7 Enable annotate_overrides in several packages
Other than analysis_server/test/analysis/notification_overrides_test.dart,
which had a naming conflict, all of the changes were made using dartfix.

Change-Id: I911dd75dcdee00420caa48724125e86d47c8857d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130002
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-01 21:31:40 +00:00
Brian Wilkerson 7d41ae7d15 Enable unnecessary_this in several packages
Change-Id: I743066d66dbf1dff984e8f8bf5b7a472c9bc7ff7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129821
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-28 20:43:16 +00:00
Brian Wilkerson e2431d1452 Update the generators to not generate unnecessary uses of "this"
Change-Id: I20d15e3b0f8046065906d96860073ad4cf353868
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129815
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-28 16:23:06 +00:00
Brian Wilkerson 278551426e Enable prefer_adjacent_string_concatenation in most of the packages
Change-Id: I4d061710573c63a9db700c6156470705cf4f8548
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129762
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-27 17:03:35 +00:00
Brian Wilkerson c547f5d933 Enable prefer_generic_function_type_aliases in most of the packages
Change-Id: I1338e731aa3f42f67fec605b20455a83fd5fce43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129760
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-27 00:43:14 +00:00
Brian Wilkerson 1fe55651cb Generate end-of-line doc comments in server and plugin packages
Change-Id: I1d5517932e1c78744cfe43fc6a768a104e527091
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129520
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-24 00:34:30 +00:00
Brian Wilkerson 52c6620986 Enable unnecessary_const in analysis_server
Change-Id: I44d9902cb23d005ebedd4bc37d57d3751a8ebdc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129100
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-19 17:32:52 +00:00
Brian Wilkerson 4043a6fce3 Remove unnecessary uses of new in analysis_server
Other than analysis_options.yaml, all of the changes were from running
dartfix.

Change-Id: I92411642f12a00fc6bd0bfd24dd60fe67f0fed16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128845
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-18 19:01:51 +00:00
Brian Wilkerson c9d89d55a6 Stop generating unnecessary new and const in server generators
This doesn't remove other uses of new or const, only those that are
generated. I'll get the rest in other CLs.

Change-Id: I59c296da3d2da0f45789df156a682b9c37398087
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128840
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-18 05:15:25 +00:00