Konstantin Shcheglov
1d184ace7b
Fixes for packages:args deprecated uses.
...
Mostly addOption() -> addMultiOption().
Change-Id: Iab40059aab45a371e0def89fbdfcd08bd1487d47
Reviewed-on: https://dart-review.googlesource.com/47121
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-03-19 20:15:37 +00:00
Devon Carew
5bc6d66bd9
fix a few --preview-dart-2 issues
...
Change-Id: Ib4bd63b826d8957cdd2db97e1d5311f52bcdf921
Reviewed-on: https://dart-review.googlesource.com/46304
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2018-03-13 17:46:09 +00:00
Devon Carew
80a571d546
Take the --preview-dart-2 defaults from the context and options classes, not the cli tool defaults.
...
Also, allow --no-preview-dart-2 from dartanalyzer.
Change-Id: Ic304a29e640bbddb50892c28712a131a2b306930
Reviewed-on: https://dart-review.googlesource.com/45881
Commit-Queue: Devon Carew <devoncarew@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-03-09 22:30:24 +00:00
Paul Berry
421db9c69c
Re-land "Implement proper checking for callability of Function class."
...
(was reverted in https://dart-review.googlesource.com/c/sdk/+/40980
due to an analyzer bot breakage)
Original commit message:
Implement proper checking for callability of Function class.
There was some old (incorrect) logic for doing this, behind the flag
enableStrictCallChecks. This flag has been removed, since the new
behavior is now standard in Dart 2.0.
Fixes #31509
Change-Id: Ice5cf38bbc648badf7f2563ff930b69f9a799635
Reviewed-on: https://dart-review.googlesource.com/41120
Reviewed-by: Jonas Termansen <sortie@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2018-02-14 11:30:23 +00:00
Paul Berry
35aea15097
Revert "Implement proper checking for callability of Function class."
...
This reverts commit 6837dafcc3 .
Reason for revert: Broke analyzer bots.
Original change's description:
> Implement proper checking for callability of Function class.
>
> There was some old (incorrect) logic for doing this, behind the flag
> enableStrictCallChecks. This flag has been removed, since the new
> behavior is now standard in Dart 2.0.
>
> Fixes #31509
>
> Change-Id: I4a6da34a4b85ea8409f6e0d14c377a586546056a
> Reviewed-on: https://dart-review.googlesource.com/40509
> Commit-Queue: Paul Berry <paulberry@google.com >
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
> Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
TBR=paulberry@google.com ,scheglov@google.com ,brianwilkerson@google.com ,mfairhurst@google.com
Change-Id: Ib631ad16bc5e937ff914127d1c5330f3fcaff2c9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/40980
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2018-02-13 19:56:35 +00:00
Paul Berry
6837dafcc3
Implement proper checking for callability of Function class.
...
There was some old (incorrect) logic for doing this, behind the flag
enableStrictCallChecks. This flag has been removed, since the new
behavior is now standard in Dart 2.0.
Fixes #31509
Change-Id: I4a6da34a4b85ea8409f6e0d14c377a586546056a
Reviewed-on: https://dart-review.googlesource.com/40509
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
2018-02-13 14:19:08 +00:00
Jaime Wren
cd878bc433
Create the new flag --use-cfe in the analyzer, analysis server and analyzer_cli and migrate the old behavior of --preview-dart-2 to --use-cfe. The --preview-dart-2 flag is now a no-op, with functionality coming soon.
...
See https://github.com/dart-lang/sdk/issues/31640
Change-Id: I2db2e7ef6a324cbd5d369b807e331495fed167df
Reviewed-on: https://dart-review.googlesource.com/33121
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Jaime Wren <jwren@google.com >
2018-01-08 22:37:05 +00:00
Konstantin Shcheglov
ffadd1ed3d
When running analyzer_cli with --preview-dart-2, load SDK from vm_outline.dill.
...
We need this to be able to access classes that are required by Fasta,
but come from VM patches.
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: I4d29e1dca42e016446516a2dab0fae138cb74548
Reviewed-on: https://dart-review.googlesource.com/16863
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-10-26 23:34:18 +00:00
Brian Wilkerson
fbd7619b2e
Remove missed references to enableAssertInitializers
...
Change-Id: I2403d8bbc5db877bfdf28cc05f4e498d95b1b06d
Reviewed-on: https://dart-review.googlesource.com/11260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-10-05 17:44:20 +00:00
Sigmund Cherem
436ed70100
Add preview-dart-2 flag to analyzer cli and plumb it through test.py.
...
This allows us to collect stats about language-style tests as follows:
./tools/test.py -m release -c dart2analyzer -r none --preview-dart-2 --report \
language language_2 corelib corelib_2
As of this morning, the command above has 87% of the tests passing.
Change-Id: I0f84211d5f33659d5923601267367be90c578107
Reviewed-on: https://dart-review.googlesource.com/3381
Reviewed-by: William Hesse <whesse@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-07 20:13:40 +00:00
Devon Carew
13346cab3d
Put the analytics UI behind a flag.
...
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/3003783002 .
2017-08-24 11:17:37 -07:00
Leaf Petersen
1eb480d266
Add --no-declaration-casts option to analyzer.
...
Adds a flag to disable and enable declaration casts independently
from other casts.
Fixes #29546
BUG=
R=brianwilkerson@google.com , rnystrom@google.com
Review-Url: https://codereview.chromium.org/2976963002 .
2017-07-20 15:55:07 -07:00
Konstantin Shcheglov
711e37295a
Remove the --build-summary-only-diet option.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2968403002 .
2017-07-07 09:15:48 -07:00
Devon Carew
d4abd49df7
Add analytics to analyzer-cli and analysis server.
...
BUG=
R=brianwilkerson@google.com , scheglov@google.com , zra@google.com
Review-Url: https://codereview.chromium.org/2963323002 .
2017-07-05 23:29:46 -07:00
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
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
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
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
d392382d10
Fix several typos.
...
BUG=
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2829963006 .
2017-04-22 11:15:03 -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
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
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
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
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
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
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
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
b7f17423da
Revert "Revert "Reapply "Switch to the new analysis driver in analyzer_cli."""
...
This reverts commit 64df435361 .
Originally landed as https://github.com/dart-lang/sdk/commit/cda7520e5c19425637351be5eae04af7e3136111
No new changes.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2698263002 .
2017-02-16 09:43:31 -08:00
Zach Anderson
64df435361
Revert "Reapply "Switch to the new analysis driver in analyzer_cli.""
...
This reverts commit 623d2868a9 .
Review-Url: https://codereview.chromium.org/2692073004 .
2017-02-14 15:21:53 -08:00
Konstantin Shcheglov
623d2868a9
Reapply "Switch to the new analysis driver in analyzer_cli."
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2696083002 .
2017-02-14 14:41:42 -08:00
Konstantin Shcheglov
e97042bec3
Revert "Switch to the new analysis driver in analyzer_cli."
...
This reverts commit cda7520e5c .
There is a couple of integration tests for embedder analyzer_cli which
are failing, and I cannot find the solution quickly.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2695823005 .
2017-02-14 12:35:46 -08:00
Konstantin Shcheglov
cda7520e5c
Switch to the new analysis driver in analyzer_cli.
...
Our internal users use the new analysis driver, and we're enabling it
for everyone in 1.23, AFAIK.
We disable using the file system byte store during internal testing
because we don't want accidentally change analyzer code, run tests
and get all green only because we forgot to update DATA_VERSION.
R=brianwilkerson@google.com , whesse@google.com
BUG=
Review-Url: https://codereview.chromium.org/2694083002 .
2017-02-14 09:04:26 -08:00
Konstantin Shcheglov
a3cc5fe7f7
Implement using AnalysisDriver in analyzer_cli. Disabled.
...
It's not ready to be enabled yet.
There are 11 failing tests in tests/language, and 174 in tests/co19.
It also works about 5 times slower.
But I'd like to land it to make parallel changes to AnalysisDriver and
analyzer_cli to make it pass more tests and be faster.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2657903006 .
2017-01-26 10:16:52 -08:00
Dan Rubel
13bd1ad0bf
DDC/AnalyzerCLI common cmdline option processing
...
Refactor DDC and Analyzer CLI command line option processing
to use common createContextBuilderOptions method
and ContextBuilderOptions to hold common options.
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2584293003 .
2016-12-19 16:24:20 -05:00
danrubel
a105d89e2b
refactor DDC and Analyzer CLI parser option declaration
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2580933002 .
2016-12-15 14:10:09 -05:00
danrubel
e321439470
cleanup Analyzer CLI and DDC arg parsing
...
This removes the need to split arguments on '='
before calling the extractDefinedVariables method.
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2581723002 .
2016-12-15 12:16:20 -05:00
danrubel
5b84611856
refactor DDC to support --ignore-unrecognized-flags
...
* add --ignore-unrecognized-flags to DDC
* refactor Analyzer CLI to use same filterUnknownArguments functionality
* remove now unused CommandLineParser and associated tests
R=brianwilkerson@google.com , vsm@google.com
Review-Url: https://codereview.chromium.org/2578113002 .
2016-12-15 10:46:09 -05:00
danrubel
2c62510f5f
move CommandLineParser into analyzer for reuse by DDC
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2578733002 .
2016-12-14 16:31:45 -05:00
danrubel
1417eec66e
move extractDefinedVariables from analyzer cli to analyzer
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2571583007 .
2016-12-14 13:22:41 -05:00