Commit Graph

4618 Commits

Author SHA1 Message Date
Brian Wilkerson 6eaebb8463 Add navigation targets to the containing unit info
Change-Id: I5d4707f019254e9b338eae23bb8a9fb61ef14e54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119085
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-27 13:57:13 +00:00
Brian Wilkerson 07db94d454 Add support for details and implement some initial details for regions
Details provide a way for clients to provide navigation support. I'm
imagining that the description could be used as link text.

The deatils are currently more of a data dump than information. I need
to see more migration results in order to figure out when and how to
pare down the data into actionable information.

We might want to capture all of the navigation targets as we build the
info so that we can create anchors in the HTML.

Change-Id: Ie48622ce7d935d3c028ea42e51cfc8da590db149
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118908
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2019-09-26 18:03:40 +00:00
Sam Rawlins 661816ea06 Use Context.separator in nnbd i13n output; Fixes #38574
Change-Id: If125bc6d8bc9ae66d949c712921b6ce7da428f6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118890
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-09-26 17:24:12 +00:00
Sam Rawlins c49d3c3486 Use a root directory for NNBD i13n output.
Change-Id: I4ad9d59136010240d56043609ef37edf44ebc4be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118880
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-26 02:46:22 +00:00
Sam Rawlins 344b30e8ce Enable pedantic 1.8.0 in analyzer, analysis_server
Since some pedantic issues were individually enabled, this CL turns our
analysis_options files into something more like "pedantic lints,
except ...". Effectively, this _adds_ the following lint rules:

* avoid_empty_else
* avoid_relative_lib_imports
* avoid_shadowing_type_parameters
* avoid_types_as_parameter_names
* library_names
* library_prefixes
* null_closures
* prefer_contains
* recursive_getters
* type_init_formals
* unnecessary_null_in_if_null_operators
* unrelated_type_equality_checks
* use_rethrow_when_possible

It also documents (for some rules) how many violations certain rules have.

Change-Id: I79a2c101ae4d10215d3f232d9e511bf8e6c7faa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118720
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-25 19:08:03 +00:00
pq 7235115f36 statement completion for expression bodies
See: https://github.com/flutter/flutter-intellij/issues/3253

Change-Id: Ib892833ecfa4500b726f4f6df42f16f0618c994d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118663
Reviewed-by: Steve Messick <messick@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-25 17:56:45 +00:00
Brian Wilkerson 763421a88e Add a first test of the InfoBuilder
Change-Id: I0f2f85d31696290b8b46892289e4c1cebf0e042f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118680
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2019-09-25 01:44:27 +00:00
Sam Rawlins 660ee086b5 NNBD Migration Tool - Use InfoBuilder in non_nullable_fix.
Change-Id: Ib1b57e59edd5578246905830afa902668acbb24b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118620
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-24 23:04:50 +00:00
Brian Wilkerson eb4aaa1b13 First sketch at generating migration info from instrumentation data
Change-Id: I129fe24ee15652e8eec7d674a03b3dee6e44ed9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117923
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2019-09-24 18:12:49 +00:00
Sam Rawlins 87a369f1d2 Add syntax highlighting to instrumentation_renderer
In this change, we also push HTML escaping to mustache.

Changes can be seen in x20 pages emailed to the team.

Change-Id: I239668a0844fb5bd7c90848f25a3cbf29e50363d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-09-23 18:51:55 +00:00
pq 7367b6f192 fix for MISSING_CONST_FINAL_VAR_OR_TYPE
Change-Id: Ic332128c5981d0a120f169c948bf794d57f3c709
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118202
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-20 01:26:44 +00:00
Sam Rawlins 97346ff476 Initial migration i13n HTML output
Change-Id: If614fa0719d8ffdaa7a41cca6d0df249772c2437
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117928
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-09-19 22:56:44 +00:00
pq f8f54c883b check for existing asserts before suggesting to add one
Change-Id: Id17bf2e2dedd44c88aa4a95f4e2123a70113399e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118102
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-19 19:07:07 +00:00
pq ad7374fcdb assist to insert null checks
(still WIP)

Change-Id: Icca46e4a9fbca43f00151d99cb24935e18c97294
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117589
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-18 22:32:15 +00:00
Brian Wilkerson 771ee9f9ba Pass the output directory to dartfix and install a listener when output should be generated
Change-Id: Ie73287f212246493a6f95aa39f56bf60c0b23f4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117769
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-18 20:03:00 +00:00
Konstantin Shcheglov 4102e63f37 Deprecate TypeProvider.listType/mapType
R=brianwilkerson@google.com

Change-Id: I7cef0b752be4ef6a7e4bc5394e14cd64ecb67ab5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117765
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-18 17:55:03 +00:00
Brian Wilkerson 74af5f3496 Add a representation of the information captured from an nnbd migration
Change-Id: Ia201c59ebb31709278ec4efaf7432af757716cf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117764
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-18 17:22:23 +00:00
Konstantin Shcheglov d4f1b8f8db Deprecate TypeProvider.futureType/futureOrType
R=paulberry@google.com

Change-Id: Idde7d82b217b5921c0770d9b69f6934a1e1fc493
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117682
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-18 15:37:21 +00:00
Brian Wilkerson f3b54fae0a Information for the migration result pages
Change-Id: I237efbbd1ed50963b28dce738c2a365c244b3a88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117587
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-18 15:20:50 +00:00
Konstantin Shcheglov 1a812bb6bb Deprecate TypeProvider.setType
R=brianwilkerson@google.com

Change-Id: I522066c919b5eef9640243c8b08435756d9481f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117597
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-18 00:20:46 +00:00
Konstantin Shcheglov e32706ec05 Remove '--use-summary2' from DAS.
R=brianwilkerson@google.com

Change-Id: I22d99ae50e19d5e1b624a0d807cead676411f58d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117586
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-17 19:28:01 +00:00
pq d4fd853523 fix for unused_element
Change-Id: Id72c792dff73a08a10f03f494bf3adc39b91b872
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117521
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-17 17:04:09 +00:00
pq f309ca5faa improvements to remove_unused_local_variable
Change-Id: Ia787f1ef0d0587b6ba0c91615dc0baaef1b5d0bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-17 02:27:18 +00:00
Brian Wilkerson dd83ded1e9 Add output directory field to dartfix API
Change-Id: Ia2dc3e4d3a458f43e9f2b0c1a25418f10931920c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117442
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2019-09-16 22:51:21 +00:00
pq 74fb313c78 nodeInList utility
Change-Id: I213dcb281c8484bc2f44a2046dbbe54e92e5d645
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-16 21:56:21 +00:00
Konstantin Shcheglov 6a9d792454 Move NullabilitySuffix to API.
R=brianwilkerson@google.com

Change-Id: I58547075d3472e6708e6b5ff1c6d89f768aba66a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-16 21:14:11 +00:00
Konstantin Shcheglov e978b32a7e Stop using '.type' in analysis_server.
R=brianwilkerson@google.com

Change-Id: I0cff6d1b46e56651d7ed2d60e0bf76bb7272f5de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117294
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-16 19:05:13 +00:00
pq ec1b9615b1 fix for unused_field
Change-Id: I7ea76765eba72290459f333a86349bda5af1370c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117340
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-16 18:20:49 +00:00
pq 4575e4df37 fix for UNUSED_LOCAL_VARIABLE
see: https://github.com/dart-lang/sdk/issues/38361

Change-Id: I5329067d6f132393efd9194886713c30e1dafbfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117205
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-14 13:45:44 +00:00
Brian Wilkerson e8413cd08d Add a fix to allow unqualified references to static members to be qualified.
Change-Id: Iecc08f6ed05509ff170c3276c89bfbaf1406a437
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117165
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-13 18:11:36 +00:00
Brian Wilkerson 7badd807b1 Add a fix to replace an override with the extension name if accessing a static member
Change-Id: I5c7557aaff6af4eeaad196513c3315679fab26f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117011
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-12 19:54:52 +00:00
pq 9d3de982c6 fix for REMOVE_UNUSED_LABEL
see:  https://github.com/dart-lang/sdk/issues/38361

Change-Id: I45fdba9f12d9fdfd7d431149da97632df97a4653
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117008
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-12 18:59:18 +00:00
pq 1d01d91c33 fix for sort_child_properties_last
Change-Id: Ife3f05077fcd48e8f821314b55ba481918ba05c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-12 00:07:40 +00:00
Konstantin Shcheglov eac977bef0 Issue 38273. Fix for inlining methods ending with a return statement without an expression.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/38273
Change-Id: Ib399379f8aecb1e7737f2efdeb9dbf53f27d4abb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 23:27:40 +00:00
Brian Wilkerson 25edeb7ae1 Support completing the extension name locally
Change-Id: I49174918ca84f2aaafe4b47200e9396f2191a727
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116802
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 21:42:26 +00:00
pq e35408df41 update REMOVE_TYPE_ANNOTATION assist error associations
(mainly book-keeping and TODOs)

Change-Id: Ic99828b469e7e78c1ae100fa0a0b15d14c5ecfcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116801
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-11 20:10:39 +00:00
Konstantin Shcheglov 4f8f592b51 Remove adding prefixes for auto imports.
Adding import prefixes often has false positives.
At this point I think that this feature does more harm than benefit.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/38326
Change-Id: I99e3400aebc062d9de3c298d7ed58520534d061c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116746
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 19:04:47 +00:00
Konstantin Shcheglov 76e6325ae0 Remove unused methods of AnalysisContext.
Change-Id: Ie7f81ac09b51f7a4e70a32f962e6e15c81245820
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116724
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 17:09:47 +00:00
pq 27918cdb29 fix for prefer_inlined_adds
Change-Id: Icd307a2bc7fdb1d3e63fd5144af79dcc430b5ba8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-11 16:54:07 +00:00
Brian Wilkerson 1b67cc79da Suggest completions for extensions in parts
Change-Id: I3aceaf24680ee7599a0beccd79dde1f790ec5ad1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116686
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-11 13:34:07 +00:00
Brian Wilkerson f3911dffb5 Update included element kinds to include extensions
Change-Id: I1eada569734810707df085b8b66e02f1458aabf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116660
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-10 21:37:26 +00:00
pq 24857b773a fix for prefer_spread_collections
Change-Id: I5509b4a0dc7a9d404c484915794ff22ee51d502e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116541
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-10 16:42:40 +00:00
pq 8329968192 fix for prefer_single_quotes
Change-Id: I844c6847fb3318cca34fb18b5fb89e1f4196f357
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-10 13:54:56 +00:00
pq 9a2e2801d9 fix for avoid_relative_lib_imports
Change-Id: Ib7ffd8cab3d1f0b22ebb9ad2d284c65d3194de15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116484
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-10 12:28:26 +00:00
pq 27f803db76 fix for convert_to_null_aware_operators
Change-Id: I3d256ab5d474b91796226aba08058250dc2451c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116362
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-09 19:17:08 +00:00
pq 9fd672b1b7 fix for prefer_expression_bodies
Change-Id: Ie1a76db4450f1b2447e8988e84f758d623810264
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-09 18:06:06 +00:00
pq ab5e36bcfb fix for prefer_int_literals
Change-Id: I4743fdce6e638e20e641d764b7e1dd607419dcd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-09 13:39:47 +00:00
pq 5247036142 fix for convert_to_if_element
Change-Id: I311b503313ad88121098bc13fc2909ff964907d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116058
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-06 23:14:16 +00:00
Brian Wilkerson 67cdae394f Add import fix in missed case
Change-Id: Iee046e2cfcbb6ca51c7d6315f492099ab1128a03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116056
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-06 22:27:35 +00:00
Brian Wilkerson eb60f0531e Support a fix to add a setter, both in extensions and elsewhere
Change-Id: I94d7ec13a2bcf73b120be18facf473a4710a6e28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116053
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-06 21:59:14 +00:00