Commit Graph

144 Commits

Author SHA1 Message Date
Sam Rawlins 9a79d61c36 Do not rename method parameter names in overrides
Change-Id: I8c2f91a56c767c89dc4d0bea22b64dec147870c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237852
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-03-21 17:32:22 +00:00
Konstantin Shcheglov 95644dcde5 Stop using the remaining methods of StringUtilities.
Change-Id: I099c4f79f2cd5dede474412e72d6d53ef555deff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223300
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-11 18:50:01 +00:00
Keerti Parthasarathy 56e7532f99 Implement rename method for Cider
Change-Id: I48d65146b9a7f1687f9afc437aebae3aaa6f533b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218785
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-11-03 23:33:13 +00:00
Konstantin Shcheglov 930895e8a2 Breaking changes for analyzer version 2.0.0
Latest google3 presubmit looks green.
https://test.corp.google.com/ui#id=OCL:374078884:BASE:382671882:1625203035014:dc4c1c68

Change-Id: I12f6a8a27b8783652e3a2c16d2f39a672dee4eb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185903
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-02 19:02:44 +00:00
Konstantin Shcheglov 9f986d2501 Migrate package:analyzer to null safety.
Change-Id: Iffe4370431587e46a141ddc72a86ceec29c163b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176486
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-02-01 18:56:04 +00:00
Konstantin Shcheglov a51f1747e0 Prepare to publish analyzer 0.40.0 and _fe_analyzer_shared 8.0.0.
Change-Id: I126207dcc47885565a3a6d7002ff15ad3cc493c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122483
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-18 15:12:10 +00:00
Konstantin Shcheglov ebd5b622ba Add DartSdk.languageVersion
Bug: https://github.com/dart-lang/build/issues/2763#issuecomment-666707445
Change-Id: I8232bd395abc9efea0e5c27716450d6a5442b3bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156489
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-04 21:01:09 +00:00
Brian Wilkerson 4776ac1f89 Fix a couple of recently introduced hints
Change-Id: I68b653ea44e548a2789f7e720d6abfddb7cfb08c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156721
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-31 17:33:58 +00:00
Devon Carew fc1999de15 [dartdev] Implement --enable-experiments for dart run and dart pub run.
Related to https://github.com/dart-lang/sdk/issues/42339.

Change-Id: I3fdeee33dcad0ca031f483e2e3692be300392958
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152960
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-06-30 23:22:42 +00:00
Sam Rawlins 648b5e9c68 Use ///-style doc comments in analyzer/lib
Bug: https://github.com/dart-lang/sdk/issues/33892
Change-Id: I573cb81dca6462c571bd6bf7bf309a46fd628967
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152610
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-06-26 17:58:50 +00:00
Jaime Wren 920ddae937 Re-write of the computation of the context type for code completion.  Instead of passing a parent and child node, a parent node with an offset is passed.  The primary purpose of this change was to fix a bug with argument lists which is close to being fixed.
I will follow up with some additional fixes and tests for map and list literals.

Change-Id: I1a26e8f900dcf13402385a49e8f3538c5d1b39df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151030
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-06-15 18:19:42 +00:00
Konstantin Shcheglov 439e99483f Remove DartSdk.getLinkedBundle().
R=brianwilkerson@google.com

Change-Id: I2335ad03856b73e6d864d939a90839ef85dcab78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149487
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-30 03:16:51 +00:00
Konstantin Shcheglov 6a551f8d54 Use allowed_experiments.json when building SDK summary (reland).
Landed: https://dart-review.googlesource.com/c/sdk/+/149052
Reverted: https://dart-review.googlesource.com/c/sdk/+/149201
Change-Id: Ief9430c58254fe8cbdcedc8d3678c61d4c086f67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-29 16:31:35 +00:00
Konstantin Shcheglov 21354dccc9 Remove SdkExtUriResolver.
Initial:  https://dart-review.googlesource.com/c/sdk/+/128770
Reverted: https://dart-review.googlesource.com/c/sdk/+/128820

R=brianwilkerson@google.com

Change-Id: I446d0ddf130712e94aab756e04c91ab4b5e83aeb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-20 01:08:49 +00:00
Konstantin Shcheglov becb0c0b85 Revert "Remove SdkExtUriResolver."
This reverts commit 7ef8822c2a.

Reason for revert: breaks Flutter build because dartdoc is not updated there yet.

Original change's description:
> Remove SdkExtUriResolver.
> 
> R=​brianwilkerson@google.com
> 
> Change-Id: If0d7bb91e9b1c42e15935b315288fa8e3a000c6d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128770
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

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

Change-Id: I0c9a26662a6fe6abac558313c14949886364d28e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128820
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-18 01:07:34 +00:00
Konstantin Shcheglov 7ef8822c2a Remove SdkExtUriResolver.
R=brianwilkerson@google.com

Change-Id: If0d7bb91e9b1c42e15935b315288fa8e3a000c6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128770
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-18 00:22:15 +00:00
Konstantin Shcheglov 54b7543c55 Fix unnecessary_const in analyzer.
The only non-mechanical change is update for tool/diagnostics/generate.dart
to handle MethodInvocation, because without resolution and without
explicit `new` and `const` we get MethodInvocation(s).

R=brianwilkerson@google.com

Change-Id: Ib89ce9c37066e9b27ad03aed96b349ef36f11d43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127453
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-06 15:03:00 +00:00
Konstantin Shcheglov 364dd8936b Fix unnecessary_new in analyzer.
R=brianwilkerson@google.com

Change-Id: I70f80baa3da4b14c0a52c1f28da16a9ad26d7dda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127424
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-06 01:11:30 +00:00
mnordine f594720679 Fix typo
Closes #39402
https://github.com/dart-lang/sdk/pull/39402

GitOrigin-RevId: 89a3ac03e3fc971e0fcfeb36ddcc1bc6b2ffcb34
Change-Id: Idee225262fbfa1c3dc7acbabd141eb7a275fee87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125442
Reviewed-by: Michael Thomsen <mit@google.com>
2019-11-20 11:25:52 +00:00
pq 8f90265176 de-lint collection size checks
Change-Id: Id8e7ce2ec59ad7cd2b0b9c961594a37d4fef621a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108522
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-07-10 13:46:43 +00:00
Brian Wilkerson 5f0de26d48 Clean up the remaining copyright notices
Change-Id: If099be4f71ba551df0dc3d69815ae6a9f55d1eba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97781
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-03-24 20:11:28 +00:00
Konstantin Shcheglov 1ba59eb13d Make ERROR the default severity for StaticWarningCode. Remove _StrongModeTypeErrorProcessor.
As a preparatory step for re-landing https://dart-review.googlesource.com/c/sdk/+/91170
and making these two restored problems to warnings.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I6266632ade84743b5725c54475fe402902576c00
Reviewed-on: https://dart-review.googlesource.com/c/91420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-01-28 22:08:17 +00:00
Brian Wilkerson 6c2ea4936a Clean up several deprecation hints
Change-Id: I6191ddc4bb4a98c4976d8bc281b084bfd5073547
Reviewed-on: https://dart-review.googlesource.com/c/89941
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-01-17 01:05:24 +00:00
Paul Berry a84863253c Re-apply "Add AnalysisDriver.resetUriResolution() and use it for analysis.reanalyze request."
Original change's description:
> Add AnalysisDriver.resetUriResolution() and use it for analysis.reanalyze request.
>
> This CL changes "analysis.reanalyze" API. We decided to repurpose it. It was not
> used for some time now in IntelliJ, and AFAIK has never been used in VS Code.
>
> R=​brianwilkerson@google.com, paulberry@google.com
>
> Change-Id: I7510b0189197c9f3f848b0fc59a7b2bd22889ac7
> Reviewed-on: https://dart-review.googlesource.com/c/85523
> Reviewed-by: Paul Berry <paulberry@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

Change-Id: I828c9a77f1e28d44c00bfcf39527514e39cccc42
Reviewed-on: https://dart-review.googlesource.com/c/86221
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-12-06 23:14:28 +00:00
Konstantin Shcheglov 2ede4c7543 Downgrade WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR to warning.
Per https://github.com/dart-lang/sdk/issues/34403#issuecomment-420465838
request.

R=brianwilkerson@google.com

Change-Id: I9a2c319d2262aacf14bfc180d59d16db3f199a2a
Reviewed-on: https://dart-review.googlesource.com/74560
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-12 19:11:26 +00:00
Konstantin Shcheglov 02b2deefd6 Remove StaticWarningCode.isStrongModeError flag.
It is not used internally outside Analyzer itself.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Iec2b45ebaeb49400e9f61a137a85170657856016
Reviewed-on: https://dart-review.googlesource.com/72300
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-08-31 01:19:24 +00:00
Devon Carew 6e322f794c No longer run pub list-package-dirs from the analysis server.
Change-Id: Id02bdfc25cb8827873ff607f7c4d4a3401c9a199
Reviewed-on: https://dart-review.googlesource.com/67205
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-27 23:05:41 +00:00
Brian Wilkerson 34fea8710c More cleanup related to strong mode, mostly in the SDK support
Change-Id: I1aa0f5169774d53d8ba0902df7880a6462a600bd
Reviewed-on: https://dart-review.googlesource.com/66941
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-26 16:33:11 +00:00
Brian Wilkerson ab1c1582b1 Remove deprecation hints in analyzer packages
Change-Id: I001e57239a87f2806be74052a5e7686245fea812
Reviewed-on: https://dart-review.googlesource.com/65000
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2018-07-17 15:22:07 +00:00
Konstantin Shcheglov cc034472bb Fix LineInfo.getOffsetOfLineAfter().
Or we could remove it altogether.
It is not used outside of analyzer/analysis_server/analyzer_plugin.

R=brianwilkerson@google.com

Change-Id: I89c90fc0881f2b1602128f8aacdda2762c4e7920
Reviewed-on: https://dart-review.googlesource.com/54306
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-08 20:28:07 +00:00
Brian Wilkerson 7054d92a02 Remove some classes from the analyzer public API
Change-Id: Ic53a8426818b06f44c2876abd16c789589bf78b5
Reviewed-on: https://dart-review.googlesource.com/52421
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-24 15:28:15 +00:00
Brian Wilkerson 9d7e35b417 Unmake some breaking changes made in previous CLs
Change-Id: I4c28418f8e5a3c9af7b37f44d7ebd3cd2d818c16
Reviewed-on: https://dart-review.googlesource.com/52160
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-20 16:16:09 +00:00
Brian Wilkerson b936ffb329 Move several libraries out of the public API
Change-Id: I8259de00134310f25b1c6168940aea5190488999
Reviewed-on: https://dart-review.googlesource.com/51443
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-04-17 17:35:27 +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
Brian Wilkerson 5e1cb4d41b Make SourceRange part of analyzers public API
Change-Id: I06376814ab2992623fed6d3121baa861522186c9
Reviewed-on: https://dart-review.googlesource.com/51046
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-12 21:13:16 +00:00
Brian Wilkerson 26c06cdd82 Clean up Dart 2 type issues related to YAML support
Change-Id: Ic29054afca9773286aa899eecede287f7ecbca9a
Reviewed-on: https://dart-review.googlesource.com/47680
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-22 17:06:40 +00:00
Brian Wilkerson 1560f19844 Fixes to make analyzer preview-dart-2 safe, part 1 of many
Change-Id: I8f88168a1fab61b3d0d808b5d9e09e6391325302
Reviewed-on: https://dart-review.googlesource.com/46953
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-19 13:15:46 +00:00
Brian Wilkerson 602a8c2a7b Clean up usage of deprecated constants
Change-Id: I9005ba6e94529e15d8f7b21322591f4a9dabec47
Reviewed-on: https://dart-review.googlesource.com/45763
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-03-09 01:02:49 +00:00
Konstantin Shcheglov 5cd77dda37 AnalysisOptionsProvider.getOptionsFile() should return only existing files.
R=brianwilkerson@google.com, jwren@google.com
BUG=

Review-Url: https://codereview.chromium.org/2981553002 .
2017-07-11 13:38:08 -07:00
Lasse R.H. Nielsen 807a1fb294 Add more status files for assert-in-initializer tests, remove mistype.
Review-Url: https://codereview.chromium.org/2975773002 .
2017-07-10 14:25:28 +02:00
Lasse R.H. Nielsen 609d26a227 Add assert-in-initializer-list to formal specification.
Add tests for new syntax.
Not dart-formatted yet since the formatter doesn't accept the new syntax.

R=eernst@google.com, floitsch@google.com

Review-Url: https://codereview.chromium.org/2962153002 .
2017-07-10 13:59:38 +02:00
Brian Wilkerson 24996fbfe7 Add support to pass the location of the analysis options file to plugins
R=mfairhurst@google.com

Review-Url: https://codereview.chromium.org/2947743002 .
2017-06-20 07:41:03 -07:00
Devon Carew 24b112d865 Remove an analysis server import.
BUG=
R=brianwilkerson@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2920333002 .
2017-06-05 11:22:53 -07:00
Devon Carew 0b79e4d20d update the analyzer and analysis server perf tags
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2917183003 .
2017-06-03 19:51:27 -07:00
Devon Carew 796baf6f16 Fix an issue with configuring the severity of lints.
BUG=
R=brianwilkerson@google.com, pquitslund@google.com

Review-Url: https://codereview.chromium.org/2863013002 .
2017-05-05 13:17:04 -07:00
Konstantin Shcheglov 6fe8e2278b Simplify PackageMapUriResolver - one folder, return any file, or null.
If the package is know, we return the corresponding file, whether it
exists or not.

If the package is not know, there is no valid Source to resolve to,
so we return null.

We don't need all the features that existed.

Internally we switched to BazelPackageUriResolver, which has its own
logica for searching files in workspaces across multiple folders.

All the places where we create PackageMapUriResolver in analyzer
or analysis_server, we create it with exactly one folder.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2812093002 .
2017-04-11 13:03:56 -07:00
Konstantin Shcheglov 132eb40cb6 Issue 28466. Include ErrorProcessor(s) into the AnalysisOptions signature.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/28466

Review-Url: https://codereview.chromium.org/2651513002 .
2017-01-22 13:22:20 -08:00
Konstantin Shcheglov 0728e4ee70 Implement 'analysis.getErrors' for the new driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2566013002 .
2016-12-11 15:27:57 -08:00
Brian Wilkerson e63105555b Remove uses of configuration data
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2522543007 .
2016-11-22 11:26:08 -08:00
Dan Rubel 74d713ece9 remove support for analyzer configuration in pubspec
This removes support for having directives like this in your pubspec:

analyzer:
  configuration: test_pack/config

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2511963002 .
2016-11-20 20:44:04 -05:00