Commit Graph

115 Commits

Author SHA1 Message Date
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
Dan Rubel 0d15f1d892 report errors in included options files
Example error messages include:
/analysis_options.yaml(10..27): The include file other_options.yaml in /analysis_options.yaml cannot be found.
/analysis_options.yaml(10..27): Bad options file format (expected String scope key, got YamlScalar) in /other_options.yaml(0..0)
/analysis_options.yaml(10..27): Warning in the included options file /other_options.yaml(47..49): The option 'ftw' isn't supported by 'errors'.

Since the included options file may not be part of the project,
the error is reported on the initial include statement
and includes the needed location information for the user to track down the problem.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2502233004 .
2016-11-17 14:43:05 -05:00
danrubel 68ba3cfe51 work in progress - support analysis options include declaration
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2489973002 .
2016-11-14 15:12:03 -05:00
Brian Wilkerson 685e4ff9e1 Revert "Remove unused option in server API"
Review URL: https://codereview.chromium.org/2382033003 .
2016-09-30 10:14:12 -07:00
Brian Wilkerson 2972bd0d6b Remove unused option in server API
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2382053002 .
2016-09-30 09:04:38 -07:00
Brian Wilkerson ecc84b26a4 Break up another large file
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2342733002 .
2016-09-15 07:49:27 -07:00
Brian Wilkerson 1f10422fd5 Update uses of deprecated API in ddc
R=jmesserly@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/2338883002 .
2016-09-13 11:44:38 -07:00
Brian Wilkerson 5bd4de469e Clean up warnings and hints
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2324463006 .
2016-09-09 09:09:59 -07:00
Konstantin Shcheglov 9cf47ce04c Remove parseUriWithException() and URISyntaxException.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2321263003 .
2016-09-09 08:30:01 -07:00
Brian Wilkerson fe02411930 Remove several references to JavaFile
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2323173002 .
2016-09-09 07:45:40 -07:00
Paul Berry 94309733cd Revert "Remove unnecessary hide clauses"
The `Resource` class wasn't removed from the SDK until version
1.20.0-dev.0.0, which was only recently published.  Reverting this
change to allow people using older SDK releases a little more time to
upgrade.

This reverts commit 2cdafd82c2.

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

Review URL: https://codereview.chromium.org/2299243002 .
2016-09-01 16:08:43 -07:00
Brian Wilkerson 2cdafd82c2 Remove unnecessary hide clauses
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2305453002 .
2016-08-31 16:44:52 -07:00
Konstantin Shcheglov a3a031195a Add DartSdk.getLinkedBundle() and use it in PubSummaryManager.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2242963002 .
2016-08-12 12:11:03 -07:00
Brian Wilkerson c41427383b Deprecate DirectoryBasedDartSdk and transition existing uses to the new API
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2242853002 .
2016-08-12 09:18:12 -07:00
Brian Wilkerson 5b26441dbf Convert server and cli and deprecate the old implementation
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2214613003 .
2016-08-04 11:28:16 -07:00
Brian Wilkerson b888675b55 Move embedder locator and convert context builder to use the new API
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2208503004 .
2016-08-04 10:41:53 -07:00
Konstantin Shcheglov 94a41e0d2e Fixes for context_manager_test on Windows.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2142143002 .
2016-07-12 12:26:29 -07:00
Brian Wilkerson 2eae1b611c Handle SDK extensions in the SDK
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2133873003 .
2016-07-11 07:44:11 -07:00
John Messerly 1b9bf0769d fix #26122, classify strong mode errors correctly
StaticTypeWarningCode was being handled, but many warnings with StaticWarningCode also need to be treated as errors.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2108823002 .
2016-06-28 14:35:44 -07:00
Brian Wilkerson 5c97a88ddd Remove embedder locator from analysis context
R=pquitslund@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/2078993002 .
2016-06-17 09:42:27 -07:00
Brian Wilkerson 2b522d50d0 Deprecate EmbedderUriResolver
R=pquitslund@google.com

Review URL: https://codereview.chromium.org/2076743002 .
2016-06-17 07:44:02 -07:00
Brian Wilkerson dc7fb35bd4 Refactor common portions of the two SDK implementations into a base class
R=pquitslund@google.com

Review URL: https://codereview.chromium.org/2069483002 .
2016-06-16 08:57:32 -07:00
Brian Wilkerson 62eb45dc32 Display additional context information in status pages
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2030573002 .
2016-06-01 08:11:31 -07:00
pq fba5cbc425 Analyzer 0.27.4-alpha.9 (API fixes) (#26562).
Restores `EmbedderUriResolver` API.

Addresses breakages in `dartdoc` and any other downstream dependencies.

See: https://github.com/dart-lang/sdk/issues/26562.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2021453003 .
2016-05-29 06:57:42 -07:00
pq 53fe39137f Embedder support refactoring (phase 1).
A bunch of changes to pave the way for emebdder SDK summary creation.

* Moves _embedder.yaml processing into the embedder SDK (out of the resolver).
* Changes EmbedderUriResolver to compose rather than extend a DartUriResolver.
* Fixes the wierd handling (dropping to add back) of `dart:` URIs.
* Fixes the incorrect overriding docs for `SDKLibraryImpl.shortName`.
* Updates embedder test to include a definition of `dart:core` in anticipation of adding some embedder SDK tests.

Some API work TODO in a follow-up CL (notably the way we check for the presence of embedders by querying the resolver is odd).

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2009303002 .
2016-05-25 10:52:53 -07:00
pq c07b21d03b Dangling comment reference cleanup in analyzer.
First pass with the new `comment_reference` lint.

BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1994243002 .
2016-05-19 10:24:53 -07:00
Brian Wilkerson 3024554b3c Improve type information and minor clean up
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1977413002 .
2016-05-16 08:43:58 -07:00
Brian Wilkerson 44836f8538 Support the name analysis_options.yaml for analysis options files
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1975963002 .
2016-05-13 07:33:06 -07:00
Brian Wilkerson 24d23680d1 Use null-aware operators to clean up the code
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1933763002 .
2016-04-29 08:48:12 -07:00
pq 870aa5e4f4 Pubspec-specified analysis configuration (#26359).
Provides support for pubspec-specified analysis configurations.

Context: https://github.com/dart-lang/sdk/issues/26359

TODO:
  * docs
  * CLI support

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1923973004 .
2016-04-28 13:10:45 -07:00