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
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
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
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
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
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
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
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
Brian Wilkerson
442e3849e1
Fix some parser issues related to generic functin types
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2707973008 .
2017-02-22 12:50:03 -08:00
Konstantin Shcheglov
41224bcf50
Update UnitElementResult signature.
...
It should depend only on API signatures, and should not include the
content of the file.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2714523002 .
2017-02-22 09:03:16 -08:00
Konstantin Shcheglov
94556d578d
Remove AnalysisErrorWithProperties and ErrorProperty.
...
It was not used in Analysis Server for some time, and we cannot use
it for any practical purpose with the new analysis driver.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2706123002 .
2017-02-20 15:13:42 -08:00
Brian Wilkerson
30bbc58581
Fix infinite loop when there is a cycle in the class hierarchy (issue 28837)
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2708773002 .
2017-02-20 11:46:36 -08:00
Brian Wilkerson
1bd630f4a2
Fix stack overflow printing recursive function types (issue 28835)
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2707983002 .
2017-02-20 11:37:08 -08:00
Konstantin Shcheglov
e353acf1c9
Don't sent errors for general files if the file has the same signature.
...
The signature is not in AnalysisResult, not used anywhere outside the
the driver itself yet. Do we want it for consistency with UnitElementResult?
Or make private until someone asks?
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2703983002 .
2017-02-18 12:20:42 -08:00
Brian Wilkerson
f64bad806b
Recover better from illegally named constructors (issue 28807)
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2700343003 .
2017-02-18 09:48:13 -08:00
P.Y. Laligand
131b0e600f
Made GnWorkspace more robust to the addition of new packages. ( #28824 )
2017-02-17 19:30:51 -08:00
Konstantin Shcheglov
2cc443cd12
Store analysis results for all parts of analyzed library.
...
So, when we later are requested for errors in another part, we can
return them from cache, and not to analyze the library again.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2703903002 .
2017-02-17 13:55:52 -08:00
Konstantin Shcheglov
da649c979d
Don't treat LinkedDependency URIs as absolute in resynthesizer.dart for backward compatibility.
...
The incompatibility was introduced in:
https://github.com/dart-lang/sdk/commit/f224ebda5c476773aa3bd614b8be8bd566cd1e21
R=paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2703873002 .
2017-02-17 13:38:30 -08:00
Devon Carew
6e9adf2624
Remove older deprecated flags; more cleanup to the cli help args.
...
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2692203010 .
2017-02-17 13:30:37 -08:00
Konstantin Shcheglov
69e548e93f
Enable analysis without task model in AnalysisDriver.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2698503007 .
2017-02-17 10:50:23 -08:00
Brian Wilkerson
0cd0811083
Re-enable generic function type support
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2700183002 .
2017-02-17 10:45:45 -08:00
Devon Carew
b4be2c9b1f
Options cleanup for the command-line analyzer.
...
BUG=
R=pquitslund@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2695923012 .
2017-02-17 06:18:55 -08:00
Konstantin Shcheglov
f224ebda5c
Use absolute URIs for LinkedDependency.uri/parts.
...
R=paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2700843002 .
2017-02-16 14:59:14 -08:00
Konstantin Shcheglov
ab8aea145e
Remove PubSummaryManager.
...
The new AnalysisDriver is more general approach
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2698133002 .
2017-02-16 06:58:07 -08:00
Konstantin Shcheglov
f47ebbcea3
Add CompilationUnitElement.lineInfo and resynthesize it.
...
One bit that is not quite straight is that UnlinkedUnit.lineInfo is
empty. Normally we would have [0] for empty files, which we pretend
missing files are. Should we fix this instead of checking in the
resynthesizer?
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2694403003 .
2017-02-15 09:54:28 -08:00
Brian Wilkerson
e86f70e27d
Check for no constructors before iterating (issue 28703)
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2696073003 .
2017-02-14 13:25:59 -08:00