Commit Graph

14 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
Sam Rawlins 78956cb8d4 analysis_server: Remove unnecessary imports
https://github.com/dart-lang/sdk/issues/44569

Change-Id: I0b5d237f532ab99c112247e9f24392ef317575dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177222
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-12-30 04:39:25 +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
Brian Wilkerson f60536c194 Enable slash_for_doc_comments in analysis_server
Change-Id: Id2734d4c9ce591c5746bb9aa55810c78183db38f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135940
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-14 17:17:17 +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 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 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 032bfe0872 Use void rather than Object as a type argument when possible
Change-Id: I275a20e6f58a01adda3be64cf83930cc238beed3
Reviewed-on: https://dart-review.googlesource.com/c/84700
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-19 18:32:31 +00:00
Brian Wilkerson c214c43758 Make LineInfo a public class
Change-Id: I1bc7f5302797374609752ea5293b96c30719b41f
Reviewed-on: https://dart-review.googlesource.com/51101
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-13 16:23:47 +00:00
Devon Carew 38df6ea1f4 Only show closing labels that have nesting.
Bug:
Change-Id: Ifc9177973961f2a74be3e2871aa2d58c28007478
Reviewed-on: https://dart-review.googlesource.com/29540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-12-14 15:54:50 +00:00
Devon Carew 6a19e794b1 Don't create single line closing labels.
Bug:
Change-Id: I1ced51a7b5e5aee6db03a77a788c0eeaef101469
Reviewed-on: https://dart-review.googlesource.com/10820
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-10-05 05:23:20 +00:00
Devon Carew fd4528fffb Make closing labels slightly less noisy.
Bug:
Change-Id: If916adb1cceab14c9260f288bf59878c6955f3ce
Reviewed-on: https://dart-review.googlesource.com/9000
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-27 18:52:25 +00:00
Danny Tuppeny 0647d9a228 Improvements to analysis server closing labels (#30411)
* Tweak comment that was based on integration test verison.

See #30285

* Include additional 1/2-line spans that end on same lines as >2 line spans.

See #30285

* Add tests to ensure no unwanted closing labels from multiline expressions.

See #30285

* Don't show closing labels for code inside interpolated strings.

See #30285

* Remove unwanted @soloTest.

See #30285

* Make casing of test names consistent.

See #30285

* Add a constructor and make fields final.

See #30285

* Use putIfAbsent for adding to map.

See #30285

* Shorten closing labels constructor.

See #30285

* Run "Sort members" on closing labels files.

See #30285

* Remove unnecessary type annotations.

See #30285
2017-08-11 11:04:34 -07:00
Danny Tuppeny 619f2995ab Implement analysis server closing labels (work-in-progress) (#30372)
* Add empty closing labels computer/visitor and tests.

See #30285

* Add initial implementation and test for closing labels.

See #30285

* Add various tests for analyzer closing labels.

See #30285

* Fail tests if errors occur.

Without this the notifications will never come through and the test will time out. This causes them to fail right away on errors.

See #30285

* Add test and fix for crash that occurred during testing.

See #30285

* Remove unnecessary abs().

See #30285

* Remove question that has been answered (yes).

See #30285

* Remove unnecessary .argumentList on spansManyLines check.

See #30285

* Add test for prefixed import and constructor names.

The behaviour seems like what we want, though need to confirm if this is the best way to do it.

See #30285

* Add additional prefixed tests and another TODO.

See #30285

* Fix method invocations to show full target/name.

See #30285

* Fix constructor invocations to not use toString().

See #30285

* Convert most closing label tests to unit tests.

See #30285
2017-08-09 14:13:47 -07:00