Commit Graph

432 Commits

Author SHA1 Message Date
Dan Rubel 5aa30397d7 update DDC and analyzer cli preprocessArgs
* refactor Analyzer CLI and DDC to use common preprocessArgs method
* throw clear exception if trailing @file not found or cannot be read
* update preprocessArgs method to always return new list

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

Review-Url: https://codereview.chromium.org/2572813002 .
2016-12-13 14:37:22 -05:00
Dan Rubel 665a12d1b5 add verbose option to show hidden options
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2570053002 .
2016-12-13 11:17:23 -05:00
Brian Wilkerson 756cfc963d Fix warnings
Review-Url: https://codereview.chromium.org/2564323002 .
2016-12-11 16:53:13 -08:00
Brian Wilkerson 86c62a6bad Remove the command-line plugin
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2565993002 .
2016-12-11 10:59:19 -08:00
Brian Wilkerson a01afcd1d1 Remove the options plugin
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2569603002 .
2016-12-11 08:38:29 -08:00
Brian Wilkerson ebf5fbcd0e Remove references to the linter plugin
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2567863002 .
2016-12-10 10:00:20 -08:00
Brian Wilkerson 0ea654a068 Remove the AnalysisOptionsProcessor
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2559523005 .
2016-12-07 10:51:33 -08:00
Brian Wilkerson 20baedc660 Reapply "Move the linter core to the analyzer package"
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2559773002 .
2016-12-07 09:57:17 -08:00
Paul Berry 1a172e935b Revert "Move the linter core to the analyzer package"
This reverts commit 6d9d5f53a1, which
was causing analysis server unit tests to fail.

TBR=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2561573003 .
2016-12-07 05:36:46 -08:00
Brian Wilkerson 6d9d5f53a1 Move the linter core to the analyzer package
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2553203002 .
2016-12-06 09:42:26 -08:00
Dan Rubel aff6b796f3 update analyzer cli to support include directive in analysis options file
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2541933002 .
2016-11-30 15:16:55 -05:00
Brian Wilkerson 7e067a6fc8 Enable read-only access to initializing formals (issue 27895)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2532953004 .
2016-11-29 07:46:28 -08:00
Brian Wilkerson 5b1236cfe7 Fix the setting of analysis options when there is an embedded SDK
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2523313002 .
2016-11-23 15:48:42 -08:00
Brian Wilkerson 96750cd5cb Split out options from ContextBuilder
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2425423009 .
2016-10-20 11:03:11 -07:00
Paul Berry 4b2bf4d6a0 Add an analysis option to disable cache flushing.
This improves the analysis speed of large projects by as much as 20%.
It also can be used to work around cache flushing bugs.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2383203003 .
2016-10-01 06:41:20 -07: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
Paul Berry 5d1dcde18c Revert "Issue 27375. Use ContextBuilder to find analysis options file in analyzer_cli."
This broke the analyzer bots.  See for example: https://build.chromium.org/p/client.dart/builders/analyzer_experimental-linux-release-be/builds/9135/steps/tests%20--host-checked%20--checked/logs/stdio

This reverts commit 75a4f968be.

TBR=scheglov@google.com

Review URL: https://codereview.chromium.org/2366913002 .
2016-09-23 05:12:42 -07:00
Konstantin Shcheglov 75a4f968be Issue 27375. Use ContextBuilder to find analysis options file in analyzer_cli.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27375

Review URL: https://codereview.chromium.org/2355413005 .
2016-09-22 15:11:15 -07:00
Konstantin Shcheglov 5703f5adb1 Replace using reprecated 'package:analyzer/src/generated/error.dart'.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2364643002 .
2016-09-22 10:10:53 -07:00
Paul Berry 2839653161 Fix generation of analysis results in analyzer_cli "build mode".
This was inadvertently broken in 1b10de1a86.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/2350963005 .
2016-09-20 10:07:11 -07:00
Konstantin Shcheglov 979a9bd6da Remove incremental session from analyzer_cli.
This should have been done together with 1310dc801a.

TBR

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2348283004 .
2016-09-19 15:06:03 -07:00
Konstantin Shcheglov 1387e8ec5c Remove fallback mode and corresponding cli flag.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2356523002 .
2016-09-19 14:02:14 -07:00
Konstantin Shcheglov 1b10de1a86 Generate only AST based summaries in build mode.
Should we also remove fallback mode?

R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2355613003 .
2016-09-19 13:47:38 -07:00
Paul Berry f7a12f9c83 Allow input summaries to be specified when running analyzer_cli in non-build mode.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2347133004 .
2016-09-19 12:39:24 -07:00
Konstantin Shcheglov f5a616834e Use configurations and declared variables to select import/export URIs during prelinking.
R=paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/27045

Review URL: https://codereview.chromium.org/2353433002 .
2016-09-18 14:04:01 -07:00
Brian Wilkerson a5ee525e14 Add support for accessing field formal parameters in the initializer list of constructors
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2335693002 .
2016-09-12 09:48:34 -07:00
Brian Wilkerson fa1b80fd82 Remove references to deprecated code
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2331743002 .
2016-09-10 11:28:43 -07:00
Brian Wilkerson 6c448b6938 Move exception support to its own library
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2328043002 .
2016-09-10 11:04:19 -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
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
Brian Wilkerson 1a9cafd85c Replace uses of FileBasedSource in cli
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2257023002 .
2016-08-18 06:11:28 -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
Paul Berry 902ce5e739 Record information about a summary's dependencies in the summary itself.
The idea is that we can use this information to help discover related
summary files, and determine when summaries need to be re-linked.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/2226093002 .
2016-08-09 09:31:04 -07:00
Konstantin Shcheglov 43fef756ae Provide LINE_INFO from ResynthesizerResultProvider.
Also, to guarantee that LINE_INFO is computed, we need to replace
context.getLineInfo() with context.computeLineInfo() in the server.
This should be equivalently fast in both summary (from provider) and
non-summary cases (the source should have been scanned and parsed in
order to resolve references to its elements).

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2225893003 .
2016-08-09 09:12:24 -07:00
Konstantin Shcheglov b3588f44fe Add line starts into unlinked units.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2223113002 .
2016-08-08 11:40:05 -07:00
Brian Wilkerson b47d35d706 Clean up use of resource provider in cli
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2212813003 .
2016-08-04 12:31:10 -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 f8d7925ff2 Mark analyzer_cli as strong-mode clean
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2196393003 .
2016-08-01 12:44:59 -07:00
John Messerly 4b3c06f3c5 add no-implicit-casts and no-implicit-dynamic options
* adds these to dartanalyzer command line
* adds them to .analysis_options

R=leafp@google.com

Review URL: https://codereview.chromium.org/2144383002 .
2016-07-15 16:08:20 -07:00
Brian Wilkerson f14772d8c9 Fix NPE when a resolver provider is given
R=pquitslund@google.com

Review URL: https://codereview.chromium.org/2136083003 .
2016-07-11 13:06:00 -07:00
Paul Berry a35c9415f5 Add option "--build-summary-output-semantic" to analyzer_cli.
This option has the same functionality as the flag
"--build-summary-exclude-informative", except it is an option rather
than a flag.  This makes it possible to get both a "full" summary and a
"semantic" summary by specifying both "--build-summary-output" and
"--build-summary-output-semantic".

The flag "--build-summary-exclude-informative" is kept around to ease in
transitioning tools, but it is deprecated.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2104003004 .
2016-06-29 10:25:50 -07:00
pq 1ec13d1548 Fix pipe escaping.
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2109783003 .
2016-06-28 15:17:46 -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
Jaime Wren 7f244c8d39 Deprecate FileUriResolver and RelativeFileUriResolver in source_io.dart, replace the usages with ResourceUriResolver(PhysicalResourceProvider.INSTANCE).
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2060263006 .
2016-06-16 11:14:03 -07:00
Brian Wilkerson 34a71429d9 Remove hook for setting a provider for an EmbedderUriResolver
R=pquitslund@google.com

Review URL: https://codereview.chromium.org/2075663002 .
2016-06-16 10:28:40 -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