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
Brian Wilkerson
ecc84b26a4
Break up another large file
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2342733002 .
2016-09-15 07:49:27 -07:00
Brian Wilkerson
5bd4de469e
Clean up warnings and hints
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2324463006 .
2016-09-09 09:09:59 -07:00
Paul Berry
94309733cd
Revert "Remove unnecessary hide clauses"
...
The `Resource` class wasn't removed from the SDK until version
1.20.0-dev.0.0, which was only recently published. Reverting this
change to allow people using older SDK releases a little more time to
upgrade.
This reverts commit 2cdafd82c2 .
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/2299243002 .
2016-09-01 16:08:43 -07:00
Brian Wilkerson
2cdafd82c2
Remove unnecessary hide clauses
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2305453002 .
2016-08-31 16:44:52 -07:00
Konstantin Shcheglov
cc6beaf56d
Pull in test_reflective_loader 0.0.4 and switch analyzer to it.
...
There are following changes:
1. DEPS to pull in test_reflective_loader 0.0.4
2. Rename runReflectiveTests() to defineReflectiveTests().
3. Remove analyzer's pkg/analyzer/test/reflective_tests.dart
4. Replace reflective_tests.dart imports with package:test_reflective_loader/test_reflective_loader.dart imports.
5. Sort/format and organize imports in the files with imports changes.
6. Fix for a couple of bugs in analysis_server exposed by the new loader.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2298913003 .
2016-08-31 13:46:39 -07:00
Konstantin Shcheglov
ce5a17ab63
Attempt to load sdk.ds from the only embedder.
...
And return it only in strong mode.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2277003003 .
2016-08-25 09:08:00 -07:00
Brian Wilkerson
2797cf5367
Code clean-up
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2265793002 .
2016-08-21 15:48:44 -07:00
Chris Bracken
5a936f26ea
Extract EmbedderRelatedTest to a utility file
...
This avoids importing all the embedder_test tests for tests where only
EmbedderRelatedTest is required. It also simplifies automatically globbing
utility code vs tests.
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2254313002 .
Committed: https://github.com/dart-lang/sdk/commit/8e35cbf413a25814bf3ebb4aea945a66156139a5
2016-08-18 13:38:34 -07:00
Brian Wilkerson
c41427383b
Deprecate DirectoryBasedDartSdk and transition existing uses to the new API
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2242853002 .
2016-08-12 09:18:12 -07:00