Keerti Parthasarathy
8329bd7ca8
Do not check for '.analysis_options' for default options file in builder.
...
Change-Id: I9decba4d0db318caedcfd3695f41c127b66f416f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138660
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Keerti Parthasarathy <keertip@google.com >
2020-03-09 19:31:24 +00:00
Konstantin Shcheglov
8a0d30d4e2
Fix annotate-overrides in analyzer.
...
R=brianwilkerson@google.com
Change-Id: I7a587daf9715ded6450b28ecf3892ce4181aeb37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129421
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-23 00:02:37 +00:00
Konstantin Shcheglov
21354dccc9
Remove SdkExtUriResolver.
...
Initial: https://dart-review.googlesource.com/c/sdk/+/128770
Reverted: https://dart-review.googlesource.com/c/sdk/+/128820
R=brianwilkerson@google.com
Change-Id: I446d0ddf130712e94aab756e04c91ab4b5e83aeb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-20 01:08:49 +00:00
Konstantin Shcheglov
becb0c0b85
Revert "Remove SdkExtUriResolver."
...
This reverts commit 7ef8822c2a .
Reason for revert: breaks Flutter build because dartdoc is not updated there yet.
Original change's description:
> Remove SdkExtUriResolver.
>
> R=brianwilkerson@google.com
>
> Change-Id: If0d7bb91e9b1c42e15935b315288fa8e3a000c6d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128770
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
TBR=scheglov@google.com ,brianwilkerson@google.com
Change-Id: I0c9a26662a6fe6abac558313c14949886364d28e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128820
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-18 01:07:34 +00:00
Konstantin Shcheglov
7ef8822c2a
Remove SdkExtUriResolver.
...
R=brianwilkerson@google.com
Change-Id: If0d7bb91e9b1c42e15935b315288fa8e3a000c6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128770
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-18 00:22:15 +00:00
Konstantin Shcheglov
54b7543c55
Fix unnecessary_const in analyzer.
...
The only non-mechanical change is update for tool/diagnostics/generate.dart
to handle MethodInvocation, because without resolution and without
explicit `new` and `const` we get MethodInvocation(s).
R=brianwilkerson@google.com
Change-Id: Ib89ce9c37066e9b27ad03aed96b349ef36f11d43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127453
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-06 15:03:00 +00:00
Konstantin Shcheglov
364dd8936b
Fix unnecessary_new in analyzer.
...
R=brianwilkerson@google.com
Change-Id: I70f80baa3da4b14c0a52c1f28da16a9ad26d7dda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127424
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-06 01:11:30 +00:00
Konstantin Shcheglov
eee20b4e60
Fix prefer_equal_for_default_values in analyzer.
...
Change-Id: Ia72a2ac31d6cf6329c78baad6954ac9595a6c45a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127448
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-06 00:00:30 +00:00
Konstantin Shcheglov
f979bd9899
Merge RestrictedAnalysisContext into AnalysisContextImpl.
...
We don't have any useful / old API(s) in AnalysisContextImpl,
so the distinction between these two does not exist.
Change-Id: I87ef84bc728cc1c2c0e269c695419c425afb6559
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125987
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-11-21 21:58:16 +00:00
Brian Wilkerson
5f0de26d48
Clean up the remaining copyright notices
...
Change-Id: If099be4f71ba551df0dc3d69815ae6a9f55d1eba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97781
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-24 20:11:28 +00:00
Brian Wilkerson
f141914e65
Cleanup warnings in the analyzer code base
...
Change-Id: Ie01b837243c8c003b334657d8211b4bb35ceae1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97562
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-03-22 12:39:20 +00:00
Paul Berry
5e1397fc4e
Remove unused import
...
Change-Id: I18837fe28a92fffc3a8f80460f34f14e94bb19de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96962
Commit-Queue: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-03-14 17:56:16 +00:00
Konstantin Shcheglov
eeb19b0416
Remove usages of ExtensionManager and package:plugin in general.
...
R=brianwilkerson@google.com
Change-Id: I489e72464474b3d40d7678f44562f65934f93288
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96863
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-03-14 15:31:08 +00:00
Konstantin Shcheglov
1ba59eb13d
Make ERROR the default severity for StaticWarningCode. Remove _StrongModeTypeErrorProcessor.
...
As a preparatory step for re-landing https://dart-review.googlesource.com/c/sdk/+/91170
and making these two restored problems to warnings.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I6266632ade84743b5725c54475fe402902576c00
Reviewed-on: https://dart-review.googlesource.com/c/91420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-01-28 22:08:17 +00:00
Brian Wilkerson
6c2ea4936a
Clean up several deprecation hints
...
Change-Id: I6191ddc4bb4a98c4976d8bc281b084bfd5073547
Reviewed-on: https://dart-review.googlesource.com/c/89941
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-01-17 01:05:24 +00:00
Brian Wilkerson
e9eb4842ea
Remove the unused hint code INVALID_ASSIGNMENT
...
Change-Id: I4b3aff6b53dcfb5d5f00c49992050e08e5b52002
Reviewed-on: https://dart-review.googlesource.com/c/88641
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-01-08 19:15:47 +00:00
Konstantin Shcheglov
e223bd3628
Replace most of direct uses of MemoryResourceProvider with ResourceProviderMixin.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I87114418b63ef68665b9c3e487980a72db00ec6a
Reviewed-on: https://dart-review.googlesource.com/c/81744
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-10-27 17:50:10 +00:00
Brian Wilkerson
469e1e2e64
Remove unnecessary library directives
...
Change-Id: I7a157080e4d7fd80d64489a13de4e996b5870930
Reviewed-on: https://dart-review.googlesource.com/c/79474
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-10-13 00:44:04 +00:00
Konstantin Shcheglov
9c585bf5df
Document that ResourceProvider requires absolute, normalized paths, and enforce this.
...
This allows us to avoid performing normalization, and work with paths
as is. So, this speeds up SourceFactoryImpl.restoreUri() from 7.5% to 3.7%
R=brianwilkerson@google.com
Change-Id: I085f3db40af6543fbb524a82fad48aa051e87937
Reviewed-on: https://dart-review.googlesource.com/77017
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-09-28 17:18:49 +00:00
Konstantin Shcheglov
2ede4c7543
Downgrade WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR to warning.
...
Per https://github.com/dart-lang/sdk/issues/34403#issuecomment-420465838
request.
R=brianwilkerson@google.com
Change-Id: I9a2c319d2262aacf14bfc180d59d16db3f199a2a
Reviewed-on: https://dart-review.googlesource.com/74560
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-09-12 19:11:26 +00:00
Devon Carew
6e322f794c
No longer run pub list-package-dirs from the analysis server.
...
Change-Id: Id02bdfc25cb8827873ff607f7c4d4a3401c9a199
Reviewed-on: https://dart-review.googlesource.com/67205
Commit-Queue: Devon Carew <devoncarew@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-07-27 23:05:41 +00:00
Brian Wilkerson
ab1c1582b1
Remove deprecation hints in analyzer packages
...
Change-Id: I001e57239a87f2806be74052a5e7686245fea812
Reviewed-on: https://dart-review.googlesource.com/65000
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Devon Carew <devoncarew@google.com >
2018-07-17 15:22:07 +00:00
Kevin Moore
cb4a19b5fc
misc(pkg/analyzer): update to latest pkg:matcher API
...
Change-Id: I42a5c41394226f6ddc9c0608c6d688ae683ffdea
Reviewed-on: https://dart-review.googlesource.com/62680
Commit-Queue: Kevin Moore <kevmoo@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-06-27 19:29:20 +00:00
Brian Wilkerson
7054d92a02
Remove some classes from the analyzer public API
...
Change-Id: Ic53a8426818b06f44c2876abd16c789589bf78b5
Reviewed-on: https://dart-review.googlesource.com/52421
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-04-24 15:28:15 +00:00
Brian Wilkerson
b936ffb329
Move several libraries out of the public API
...
Change-Id: I8259de00134310f25b1c6168940aea5190488999
Reviewed-on: https://dart-review.googlesource.com/51443
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-04-17 17:35:27 +00:00
Brian Wilkerson
26c06cdd82
Clean up Dart 2 type issues related to YAML support
...
Change-Id: Ic29054afca9773286aa899eecede287f7ecbca9a
Reviewed-on: https://dart-review.googlesource.com/47680
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-03-22 17:06:40 +00:00
Brian Wilkerson
8819d9fe98
Update analyzer tests for preview-dart-2, part 1
...
Change-Id: I3440607f7b3892193e1d9883709a1b9d4a7463d9
Reviewed-on: https://dart-review.googlesource.com/46562
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-03-15 16:45:04 +00:00
Mike Fairhurst
56d59dd967
Reland https://dart-review.googlesource.com/c/sdk/+/37441 with fixes
...
Change-Id: If8e2ec2ca1ac4f533dcb56b0c95d55e4a13e0598
Reviewed-on: https://dart-review.googlesource.com/39881
Reviewed-by: Paul Berry <paulberry@google.com >
2018-02-08 20:46:19 +00:00
Mike Fairhurst
ec58f5646a
Revert "Make void a static warning to use almost everywhere."
...
This reverts commit 09eed74a8a .
Reason for revert: Too much SDK code is not yet compliant.
Original change's description:
> Make `void` a static warning to use almost everywhere.
>
> Changed the hint to a StaticWarningCode, since that's the new spec'd
> error type and the hint is no longer needed.
>
> Added a new set of methods to test the cases.
>
> Didn't try to solve the problem generally ("all usages except ... are
> errors" means it easier, in theory, to make a ReportVoidExpressions
> style visitor that catches absolutely all types) because most of the
> work is actually about suppressing errors that are no longer needed.
> Ie, from NO_SUCH_METHOD to USAGE_OF_VOID_RESULT which means we have to
> put the void handling logic into each AST method specially anyway.
>
> Some redundant tests removed.
>
> Don't flag: ternaries, void -> void assignments, void returns in
> dynamic.
>
> Change-Id: Ief8035dcfe582b36b6372180ddcf4e453d320d9c
> Reviewed-on: https://dart-review.googlesource.com/37441
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
> Reviewed-by: Leaf Petersen <leafp@google.com >
TBR=leafp@google.com ,scheglov@google.com ,mfairhurst@google.com
Change-Id: I13ee4c6939468d35506779ade637a040833632f4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/39848
Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
2018-02-07 22:32:51 +00:00
Mike Fairhurst
09eed74a8a
Make void a static warning to use almost everywhere.
...
Changed the hint to a StaticWarningCode, since that's the new spec'd
error type and the hint is no longer needed.
Added a new set of methods to test the cases.
Didn't try to solve the problem generally ("all usages except ... are
errors" means it easier, in theory, to make a ReportVoidExpressions
style visitor that catches absolutely all types) because most of the
work is actually about suppressing errors that are no longer needed.
Ie, from NO_SUCH_METHOD to USAGE_OF_VOID_RESULT which means we have to
put the void handling logic into each AST method specially anyway.
Some redundant tests removed.
Don't flag: ternaries, void -> void assignments, void returns in
dynamic.
Change-Id: Ief8035dcfe582b36b6372180ddcf4e453d320d9c
Reviewed-on: https://dart-review.googlesource.com/37441
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
2018-02-07 21:36:01 +00:00
Devon Carew
2b3b0272c4
Switch to using specific throws calls instead of general throwsA() calls.
...
Bug:
Change-Id: Id604dca1b8c3060c1d12c9ed0b1493771d2eb0d6
Reviewed-on: https://dart-review.googlesource.com/5883
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Kevin Moore <kevmoo@google.com >
2017-09-14 18:04:44 +00:00
Devon Carew
b12d010064
Remove the use of deprecated package:test API.
...
Bug:
Change-Id: I671678117f72efac5efd60d7b4e459dffcce47c6
Reviewed-on: https://dart-review.googlesource.com/5542
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2017-09-13 21:55:00 +00:00
Konstantin Shcheglov
00d5012906
Format analyzer, analysis_server, analyzer_plugin, front_end and kernel with the latest dartfmt.
...
...instead of mixing formatting with actual changes in many CLs.
R=ahe@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2975253002 .
2017-07-13 16:28:18 -07:00
Devon Carew
796baf6f16
Fix an issue with configuring the severity of lints.
...
BUG=
R=brianwilkerson@google.com , pquitslund@google.com
Review-Url: https://codereview.chromium.org/2863013002 .
2017-05-05 13:17:04 -07:00
Konstantin Shcheglov
6fe8e2278b
Simplify PackageMapUriResolver - one folder, return any file, or null.
...
If the package is know, we return the corresponding file, whether it
exists or not.
If the package is not know, there is no valid Source to resolve to,
so we return null.
We don't need all the features that existed.
Internally we switched to BazelPackageUriResolver, which has its own
logica for searching files in workspaces across multiple folders.
All the places where we create PackageMapUriResolver in analyzer
or analysis_server, we create it with exactly one folder.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2812093002 .
2017-04-11 13:03:56 -07:00
Devon Carew
3fd497b510
Ignore some uses of deprecated APIs.
...
BUG=
Review-Url: https://codereview.chromium.org/2796483002 .
2017-04-03 08:31:00 -07:00
Konstantin Shcheglov
0728e4ee70
Implement 'analysis.getErrors' for the new driver.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2566013002 .
2016-12-11 15:27:57 -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
0ea654a068
Remove the AnalysisOptionsProcessor
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2559523005 .
2016-12-07 10:51:33 -08:00
Dan Rubel
74d713ece9
remove support for analyzer configuration in pubspec
...
This removes support for having directives like this in your pubspec:
analyzer:
configuration: test_pack/config
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2511963002 .
2016-11-20 20:44:04 -05:00
Dan Rubel
c1451ac218
fix include options test on windows
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2505633002 .
2016-11-15 15:13:25 -05:00
danrubel
18ab91f70b
skip new test on windows
...
Review URL: https://codereview.chromium.org/2496403002 .
2016-11-14 16:35:45 -05:00
danrubel
68ba3cfe51
work in progress - support analysis options include declaration
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2489973002 .
2016-11-14 15:12:03 -05:00
Konstantin Shcheglov
d4ebdabf43
MemoryResourceProvider.getFolder() should not create the folder.
...
But newFolder() should be used to create.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2396423002 .
2016-10-07 10:12:00 -07:00
Brian Wilkerson
2328bef00b
Fix more tests on windows bots
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2398113002 .
2016-10-06 10:21:01 -07:00
Konstantin Shcheglov
5455fd0118
Remove 'initializeTestEnvironment' from 'analyzer'.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2399913002 .
2016-10-06 10:18:54 -07:00
Konstantin Shcheglov
175dad4f15
Switch 'analyzer' to 'package:test' and test_reflective_loader ^0.1.0.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2391423003 .
2016-10-06 08:46:35 -07:00
Brian Wilkerson
ef2a3b982c
MemoryResourceProvider always uses the current platform
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2391883002 .
2016-10-03 19:24:21 -07:00
Brian Wilkerson
ab9ba20c04
Fix recently introduced strong-mode errors
...
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/2344933002 .
2016-09-15 14:37:37 -07:00