Commit Graph

448 Commits

Author SHA1 Message Date
Devon Carew f1a5503fcc Add --fatal-infos; hide --fatal-hints.
BUG=
R=brianwilkerson@google.com, danrubel@google.com

Review-Url: https://codereview.chromium.org/2874043002 .
2017-05-10 11:45:11 -07:00
Konstantin Shcheglov bd1ee32543 Move [file_]byte_store.dart into pkg/front_end/test/src/incremental/.
We are going to reuse ByteStore in front_end, also for incremental
compilation.

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

Review-Url: https://codereview.chromium.org/2869803004 .
2017-05-09 09:12:15 -07:00
P.Y. Laligand 21e9c40b8f Disable analysis on a few packages. (#29571) 2017-05-05 22:06:00 -07:00
Devon Carew f6f845c879 Fix a completion exception during import suggestions.
BUG=
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2862793002 .
2017-05-04 09:24:18 -07:00
Konstantin Shcheglov 9a34ac9f27 Type inference for StringConcatenation.
The test simple_literal_string was replaced with string_literal.

R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2855403002 .
2017-05-04 08:47:12 -07:00
Konstantin Shcheglov b567aeaeef Change Accessor(s) to use AstFactory to create MethodInvocation, PropertyGet/Set.
R=ahe@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2857133004 .
2017-05-03 14:10:54 -07:00
Devon Carew 5d0056df88 Make the exit code for dartanalyzer more deterministic.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2857203002 .
2017-05-03 11:38:35 -07:00
Paul Berry d842f35bb2 Add a strong mode implementation of LUB to fasta; use it to infer ?:
R=ahe@google.com, leafp@google.com

Review-Url: https://codereview.chromium.org/2849213002 .
2017-05-03 10:36:47 -07:00
danrubel 9649ca1a94 fix driver test
Review-Url: https://codereview.chromium.org/2855513002 .
2017-04-30 23:35:59 -04:00
danrubel c8784af933 rename .analysis_options --> analysis_options.yaml
See https://github.com/dart-lang/sdk/issues/28385

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

Review-Url: https://codereview.chromium.org/2839383003 .
2017-04-30 18:33:10 -04:00
Brian Wilkerson e009f32ad7 Fix a failing test
Review-Url: https://codereview.chromium.org/2848643004 .
2017-04-27 10:45:24 -07:00
Brian Wilkerson 511a06ee00 Fix some issues with options handling
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2844663003 .
2017-04-27 10:22:37 -07:00
pq ef60d4b46e IML updates for 2017.
BUG=
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2852483003 .
2017-04-27 10:17:39 -07:00
Devon Carew 66ac96c4a6 Use the dart:io Platform.resolvedExecutable API to locate the Dart SDK.
BUG=
R=brianwilkerson@google.com, danrubel@google.com, pquitslund@google.com

Review-Url: https://codereview.chromium.org/2844883005 .
2017-04-27 09:29:08 -07:00
Jacob MacDonald 466d951c25 Add support for unlinked summary inputs through --build-summary-unlinked-input
BUG=
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2836873005 .
2017-04-26 09:11:33 -07:00
Devon Carew 3bad1dfb4c Refactoring analyzer_cli for code hygiene.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2840703002 .
2017-04-24 16:55:34 -07:00
Devon Carew eae2bf2747 Fix an issue with duplicate reported analysis errors.
BUG=
R=brianwilkerson@google.com, danrubel@google.com

Review-Url: https://codereview.chromium.org/2793813002 .
2017-04-23 21:05:10 -07:00
Devon Carew d392382d10 Fix several typos.
BUG=
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2829963006 .
2017-04-22 11:15:03 -07:00
Jacob Richman 6ac3a24a2e Run formatter on the analyzer.
BUG=
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2826693004 .
2017-04-19 08:24:09 -07:00
Vijay Menon a3d2e49198 Revert "Revert "Report error if the same uri appears in multiple summaries.""
Relanding after fixing package_bundle_reader_test.dart.

Note, original CL (already reviewed here: https://codereview.chromium.org/2781483007/) is patch set 1.

Test fix is patch set #2.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2825503002 .
2017-04-17 10:11:21 -07:00
Vijay Menon dcdccf4750 Revert "Report error if the same uri appears in multiple summaries."
This reverts commit 2afa21bb2c.

Breaking the bots.

TBR=jmesserly@google.com
BUG=

Review-Url: https://codereview.chromium.org/2821933002 .
2017-04-17 08:07:36 -07:00
Vijay Menon 2afa21bb2c Report error if the same uri appears in multiple summaries.
Fixes #27025

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

Review-Url: https://codereview.chromium.org/2781483007 .
2017-04-17 07:32:59 -07:00
pq 1d4d0d769f CLI support for enableAssertInitializers.
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2809793004 .
2017-04-12 10:38:30 -07:00
Konstantin Shcheglov 021d99e05d Issue 29288. Resynthesize Import/Export/PartElement for every directive.
We need all of them because there might be associated annotations,
which should be applied to corresponding AST nodes.

https://github.com/dart-lang/sdk/issues/29288
https://github.com/dart-lang/sdk/issues/29188

R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/29288

Review-Url: https://codereview.chromium.org/2809523002 .
2017-04-09 10:12:43 -07:00
Jacob MacDonald 3e623d7df1 Add --build-summary-only-unlinked flag, which makes the output summary be an unlinked summary instead of a linked one.
BUG=
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2796953002 .
2017-04-04 12:22:20 -07:00
Brian Wilkerson dd49e79f74 Add context information to driver and add hooks for plugin management
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2795743002 .
2017-04-03 10:13:45 -07:00
Devon Carew 0fcb91aa06 Fix analyzer tests when run in checked mode.
BUG=

Review-Url: https://codereview.chromium.org/2775073002 .
2017-03-25 15:34:40 -07:00
Devon Carew b51d1fd8e3 Use ansi color in the dartanalyzer cli output.
BUG=
R=brianwilkerson@google.com, danrubel@google.com

Review-Url: https://codereview.chromium.org/2775633002 .
2017-03-25 15:02:47 -07:00
Jennifer Messerly f3f814b899 fixes #29095, machine mode escapes newline/returns
R=skybrian@google.com

Review-Url: https://codereview.chromium.org/2770493003 .
2017-03-21 19:31:36 -07:00
Jacob Richman a993294503 Format all analyzer packages
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2753923003 .
2017-03-16 16:11:43 -07:00
Nate Bosch 56ad714d6b Correct --persistent_worker arg constraint check
Previously the args were normalized to change an arg with `=` into
separate args. That normalization was removed in
https://github.com/dart-lang/sdk/commit/e321439470ec016e9532afe57b7f2891c0282d83

This fixes an issue with using the analyzer in worker mode on the
current SDK.

- Allow the case where there are 3 args and one of them starts with
  --dart-sdk rather than require it to be the entire string
- Split into two bools with more descriptive names and refactor from an
  if/else chain into a composed condition

R=jakemac@google.com

Review-Url: https://codereview.chromium.org/2733953005 .
2017-03-08 12:10:27 -08:00
Paul Berry a2c4fe177f Update .iml files.
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2734723002 .
2017-03-05 11:58:36 -08:00
danrubel 0c290ae456 echo analysis options information if dartanalyzer --verbose is specified
With this change, if the dartanalyzer --verbose option is specified
then you will see additional output indicating which analysis options
file was read:

Loaded analysis options from /path/to/.analysis_options

In addition, if there are any command line flags that specify/override
an analysis option then you will see something similar to this:

Analysis options: strong = true

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2726783002 .
2017-02-28 17:49:43 -08:00
danrubel b401f7272f cleanup bazel workspace relative path test
Review-Url: https://codereview.chromium.org/2712333002 .
2017-02-26 13:19:25 -08:00
danrubel 4c771a52d3 fix failing bazel workspace relative path test
Review-Url: https://codereview.chromium.org/2721483002 .
2017-02-26 12:44:28 -08:00
danrubel 130f43fe7b fix failing bazel workspace relative path test
Review-Url: https://codereview.chromium.org/2720593002 .
2017-02-26 11:14:14 -08:00
danrubel 994a3a2b20 Revert "debug failing test"
This reverts commit c78ea8c231.

Review-Url: https://codereview.chromium.org/2721473002 .
2017-02-26 11:08:19 -08:00
danrubel c78ea8c231 debug failing test
Review-Url: https://codereview.chromium.org/2721453002 .
2017-02-26 09:47:58 -08:00
danrubel 37a6a49744 cleanup --batch-mode sourceFiles
BuildMode, the dartanalyzer driver used when the "--build-mode" option
is supplied, expects sourceFiles in the format "<uri>|<filepath>",
but the rest of the dartanalyzer code base does not understand this format.
This change updates BuildMode to rewrite sourceFiles,
stripping the "<uri>|" prefix, so that it does not cause problems
with code that does not expect this format.

Fix https://github.com/dart-lang/sdk/issues/28889

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2720493002 .
2017-02-26 08:54:51 -08:00
danrubel c04f6a2ab1 fix dartanalyzer find options in bazel workspace
- add dartanalyzer test for bazel workspace
- ensure call to getAnalysisOptions passes an absolute path
- update BasicWorkspace to have an absolute normalized path similar to BazelWorkspace

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2719703005 .
2017-02-26 08:52:55 -08:00
Brian Wilkerson be65669b34 Fix tests that are failing on windows
Review-Url: https://codereview.chromium.org/2713913003 .
2017-02-24 08:18:54 -08:00
Konstantin Shcheglov 91d62cb226 Remove addFile() invocations in analyzer_cli.
Now that we always get errors when we ask for the result, we don't need
adding these files. This makes analysis of shared tests about 15-20% faster.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2711233002 .
2017-02-23 14:41:31 -08:00
danrubel abee739921 rework analyzer_cli to use ContextBuilder getAnalysisOptions
This is a follow on to https://codereview.chromium.org/2716693003
that refactors analyzer_cli to use ContextBuilder.
As a result, dartanalyzer now correctly finds the default
flutter analysis options when the project references package:flutter
but does not contain an analysis options file.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2710313002 .
2017-02-23 16:52:26 -05:00
danrubel 289888cd0e enhance ContextBuilder getAnalysisOptions to handle lints
This updates ContextBuilder to process the --lints command line option:
* --[no-]lints enables (or disables) lints
* if --lints but no lints specified in analysis options
    then the default set of lints is used
* if --no-lints then lints are turned off
    regardless of what is specified in the analysis options
* if neither --lints nor --no-lints are specified
    then lints are turned on iff analysis options specifies lints

My next step is to update analyzer_cli to use ContextBuilder getAnalysisOptions

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2716693003 .
2017-02-23 16:23:43 -05:00
Devon Carew cf1e1cd2cf Re-land minor tweaks to the analyzer cli's usage text.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2717563003 .
2017-02-23 12:59:43 -08:00
Devon Carew 9dd2a6d452 Revert "Tweaks to the analyzer_cli."
This reverts commit a7ac08d0e7.

BUG=

Review-Url: https://codereview.chromium.org/2709163005 .
2017-02-23 09:39:25 -08:00
Devon Carew a7ac08d0e7 Tweaks to the analyzer_cli.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2709013005 .
2017-02-23 09:02:49 -08:00
Devon Carew 1da570c215 Remove and hide analyzer cli flags.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2713723003 .
2017-02-22 14:09:41 -08:00
Devon Carew 46cacfeae9 Some improvements to the command-line analyzer's output.
BUG=
R=brianwilkerson@google.com, danrubel@google.com

Review-Url: https://codereview.chromium.org/2704103002 .
2017-02-22 12:35:09 -08:00
Devon Carew e415b50ff1 Remove some unused flags for the analyzer cli's build mode.
BUG=
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2709633006 .
2017-02-22 10:35:49 -08:00