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
Paul Berry
79cce42e38
Add an AST factory method for fieldDeclaration with all optional named parameters.
...
Also add 'covariantKeyword' to the Impl constructors and named factories.
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2722033002 .
2017-02-28 16:43:31 -08:00
Paul Berry
8849a29406
Implement AstBuilder.handleOperatorName.
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2723873002 .
2017-02-28 16:36:03 -08:00
Konstantin Shcheglov
36cec1faef
Parse ParenthesizedExpression as Fasta.
...
R=paulberry@google.com , ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2726693002 .
2017-02-28 15:08:23 -08:00
Paul Berry
fb1bc6ad83
Add preliminary support for method declarations to AstBuilder.
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2706293014 .
2017-02-28 15:05:31 -08:00
Konstantin Shcheglov
4d4275d36e
Replace the sequence isInstanceOf/assign with assist-with-cast in ExpressionParserTestMixin.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2719403004 .
2017-02-28 14:31:41 -08:00
Konstantin Shcheglov
25fb3dabdb
Parse ThisExpression with Fasta.
...
R=paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2719083007 .
2017-02-28 13:52:01 -08:00
Konstantin Shcheglov
e260980624
Parse SuperExpression with Fasta.
...
R=paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2721973002 .
2017-02-28 13:48:57 -08:00
Konstantin Shcheglov
f7d379a494
Run ExpressionParserTestMixin tests with Fasta.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2726543003 .
2017-02-28 13:33:52 -08:00
Konstantin Shcheglov
69063303ac
Add support for field formal function typed formal parameters.
...
Plus a couple of new tests.
R=paulberry@google.com , ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2720763003 .
2017-02-27 14:01:26 -08:00
Konstantin Shcheglov
b86388e3ed
Support for function typed formal parameters.
...
R=paulberry@google.com , ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2715203003 .
2017-02-27 12:50:08 -08:00
Konstantin Shcheglov
6d231ad0ef
Extract ExpressionParserText from SimpleParserTest.
...
So that we can run this portion of tests with Fasta.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2717233004 .
2017-02-27 12:47:57 -08:00
Janice Collins
05b00a9884
Add toSource() to ElementAnnotation, ElementAnnotationImpl (issue 28631)
...
This is the dartdoc-required case only.
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2713243003 .
2017-02-27 09:22:27 -08:00
danrubel
ea4b380f80
fix source restoreUri test
...
Review-Url: https://codereview.chromium.org/2717933002 .
2017-02-26 15:18:38 -08:00
danrubel
00e705835d
revert restoreUri test on Windows
...
Review-Url: https://codereview.chromium.org/2719803002 .
2017-02-26 14:52:46 -08:00
danrubel
4ca5ac929a
fix MemoryResourceProvider context on Windows
...
On Windows, the MemoryResourceProvider.convertPath method
prefixes the path with the C: drive, but the context associated with
the MemoryResourceProvider has a drive letter based upon the underlying
current directory. Most of the time, these two drive letters are the
same, but sometimes, such as on the Windows bot, the current working
directory is on drive E:, rather than drive C:.
This causes package Uris to be mapped to drive E: rather than the
expected drive C:
This CL changes the MemoryResourceProvider constructor
to set the current working directory to C:\ when running on Windows
so that it aligns with MemoryResourceProvider.convertPath.
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2714373002 .
2017-02-26 13:30:42 -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
danrubel
940fe975a8
Revert "debug MemoryResourceProvider on Windows"
...
This reverts commit a0ec77e383 .
Review-Url: https://codereview.chromium.org/2716153002 .
2017-02-26 08:50:09 -08:00
danrubel
a0ec77e383
debug MemoryResourceProvider on Windows
...
Review-Url: https://codereview.chromium.org/2719793002 .
2017-02-26 08:23:18 -08:00
danrubel
339d32e500
Revert "debug ContextBuilder getAnalysisOptions on Windows"
...
This reverts commit eb363eaa13 .
Review-Url: https://codereview.chromium.org/2712303002 .
2017-02-26 08:13:03 -08:00
danrubel
eb363eaa13
debug ContextBuilder getAnalysisOptions on Windows
...
Review-Url: https://codereview.chromium.org/2720583002 .
2017-02-26 07:45:56 -08:00
danrubel
0be4408efa
Revert "debug analyzer test on windows"
...
This reverts commit 7582a9dc27 .
Review-Url: https://codereview.chromium.org/2719673003 .
2017-02-25 12:43:21 -05:00
danrubel
7582a9dc27
debug analyzer test on windows
...
Review-Url: https://codereview.chromium.org/2717873002 .
2017-02-25 11:59:22 -05:00
danrubel
acd7a294e5
Revert "debug Windows tests"
...
This reverts commit 3bf53bdb0a .
Review-Url: https://codereview.chromium.org/2717783003 .
2017-02-25 11:55:29 -05:00
danrubel
3bf53bdb0a
debug Windows tests
...
Review-Url: https://codereview.chromium.org/2714883005 .
2017-02-25 10:57:12 -05:00
Brian Wilkerson
44148ec0a4
Revert "Add error for mixins defining conflicting private names (issue 28809)"
...
Review-Url: https://codereview.chromium.org/2716133002 .
2017-02-25 07:50:42 -08:00
Brian Wilkerson
e4b51548e9
Rename one AnalysisDriver to LintDriver
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2711763005 .
2017-02-25 07:28:30 -08:00
Brian Wilkerson
12b6f249f3
Add error for mixins defining conflicting private names (issue 28809)
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2716453006 .
2017-02-25 07:27:58 -08:00
Konstantin Shcheglov
8532481a87
Support multiple optional parameters.
...
R=paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2712023003 .
2017-02-24 16:34:58 -08:00
Konstantin Shcheglov
123c8a9668
Fix for serializing cascades with not-assignment access to properties.
...
This was triggering a small avalanche of inference failures internally.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2711423002 .
2017-02-24 12:59:48 -08:00
Konstantin Shcheglov
8d4e252fd1
Support for the 'covariant' keyword for formal parameters.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2716043003 .
2017-02-24 12:50:17 -08:00
Konstantin Shcheglov
392a9c5bb2
Work around the problem when type inference fails and StrongTypeSystemImpl.inferGenericFunctionCall() returns null.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2712913004 .
2017-02-24 12:47:20 -08:00
Konstantin Shcheglov
3d88437bda
Add AST factories for formal parameters with all optional named parameters.
...
Also add 'covariantKeyword' to the Impl constructors and named factories.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2713173003 .
2017-02-24 12:09:43 -08:00
Konstantin Shcheglov
ddddb2c50d
Revert "Add NormalFormalParameter.covariantKeyword setter and factory parameter."
...
This reverts commit 57b78f422e .
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2710393002 .
2017-02-23 21:22:00 -08:00
Konstantin Shcheglov
57b78f422e
Add NormalFormalParameter.covariantKeyword setter and factory parameter.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2714843002 .
2017-02-23 14:48:57 -08:00
Paul Berry
0c1facfd9b
Split parser tests that exercise class members to their own class.
...
In future CLs I will get these tests to pass.
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2713553011 .
2017-02-23 14:22:16 -08:00
Konstantin Shcheglov
48714187b3
Run src/task/strong tests with analysis driver.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2715533008 .
2017-02-23 14:13:51 -08:00
danrubel
0679f88215
gracefully degrade if lints option not defined
...
Review-Url: https://codereview.chromium.org/2710323002 .
2017-02-23 17:06:05 -05:00
Konstantin Shcheglov
f19f6d8ca6
Always return computed errors, even for not added files.
...
There is no penalty for computing it, we have already computed, it is
just a matter of returning them or not.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2709633009 .
2017-02-23 13:55:32 -08: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
Konstantin Shcheglov
7a321225f0
Make src/task/strong tests into classes and asynchronous.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2705323005 .
2017-02-23 12:54:09 -08:00
Jacob Richman
7cdf5d7f7b
Fix SummaryDataStore to support using a ResourceProvider instead of dart:io
...
This code broke running the Analyzer under Dart2JS.
BUG=
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2710193004 .
2017-02-23 11:03:34 -08:00
Jacob Richman
e36efc72d2
Fix summarize const expression logic to be compatible with Dart2JS.
...
Shifting by 32 bits is not safe when compiling to JavaScript.
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2711843003 .
2017-02-23 11:02:10 -08:00
Konstantin Shcheglov
02da0fb1dd
Issue 28862. Implement type inference for invokeConstructor with field formal parameter.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/28862
Review-Url: https://codereview.chromium.org/2710943007 .
2017-02-23 10:48:02 -08:00
Konstantin Shcheglov
7358288e21
Issue 28862. Implement type inference for invokeConstructor.
...
Not fully fixed yet, we don't work well with 'this.x' in constructor and
type inference. Will look in the next CL.
R=brianwilkerson@google.com , paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/28862
Review-Url: https://codereview.chromium.org/2711733003 .
2017-02-23 09:59:50 -08:00
Konstantin Shcheglov
4500bb0920
Parse optional and named parameters.
...
I'm not a big fan of the currentParameterKind stack, this information is
almost accessible from parseFormalParameter(), but we don't pass the type
to the listener.
R=ahe@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2709783003 .
2017-02-23 09:55:15 -08:00
Konstantin Shcheglov
86c1ef03ee
Add support for FieldFormalParameter.
...
R=ahe@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2716433002 .
2017-02-23 09:42: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