Commit graph

27 commits

Author SHA1 Message Date
Alexandre Ardhuin 387f885481
Add missing trailing commas (#28673)
* add trailing commas on list/map/parameters

* add trailing commas on Invocation with nb of arg>1

* add commas for widget containing widgets

* add trailing commas if instantiation contains trailing comma

* revert bad change
2019-03-01 08:17:55 +01:00
Jonah Williams a871d59164
Apply basic log filtering and formatting to fuchsia logs. (#24143) 2018-11-10 17:02:32 -08:00
Alexandre Ardhuin 2d3ff10d62
apply lint prefer_void_to_null in packages/flutter_tools (#22686) 2018-10-05 07:54:56 +02:00
Alexandre Ardhuin d927c93310
Unnecessary new (#20138)
* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
2018-09-12 08:29:29 +02:00
Ian Hickson 3dec6a6930
Clean up usage of temporary directories (#20682)
All temporary directory start with `flutter_` and have their random component separated from the name by a period, as in `flutter_test_bundle.YFYQMY`.

I've tried to find some of the places where we didn't cleanly delete temporary directories, too. This greatly reduces, though it does not entirely eliminate, the directories we leave behind when running tests, especially `flutter_tools` tests.

While I was at it I standardized on `tempDir` as the variable name for temporary directories, since it was the most common, removing occurrences of `temp` and `tmp`, among others.

Also I factored out some common code that used to catch exceptions that happen on Windows, and made more places use that pattern.
2018-08-17 13:17:23 -07:00
Ian Hickson 686d8f8a22 Shim package:test to avoid matcher issues (#20602)
* Upgrade everything except matcher.
* Roll matcher (and test)
* Adjust tests that depend on flutter:test directly to depend on a shim
* Require use of package:test shim and remove other references to package:test
2018-08-14 20:33:58 -07:00
Sam Rawlins 9f8a70be4c Bump mockito to 3.0.0-beta (#18462)
* Bump mockito to 3.0.0-beta

* Few fixes

* fix test

* Bump image

* Fix

* New packages update

* With matcher pinned

* No more typed
2018-06-21 16:23:47 -07:00
Devon Carew 36cf1158ec
add the full path to a flutter command (#16720)
* add the full path to a flutter command

* remove an unused import

* review comments
2018-04-20 17:39:32 -07:00
Sam Rawlins 2329cb7ec8 Bump mockito to 3.0.0-alpha+3 (#16306)
* Bump mockito to 3.0.0-alpha+3

* Type annotation
2018-04-09 12:43:31 -07:00
jcollins-g 26102c9120
Condense and summarize doctor output without --verbose (#14173)
* Flatten change out from lots of merges and temporary hacks for #7224

* Expand fakes to cover cases where doctor passes

* -v != --verbose

* Cosmetic touchups

* delint

* Clean up summary line, add a switch for review comments

* Review comments

* nit

* review comment

* review comments
2018-02-01 10:27:55 -08:00
jcollins-g e25d881046
Reduce the chances of bots reporting analytics (#13915)
* First version

* Prevent modification of .flutter during analytics test

* Pass in directory and override analyzer warning due to conditional import

* Review comments
2018-01-05 09:38:13 -08:00
Mehmet Fidanboylu 96942bc797
Get rid of static version methods which ignore the AppContext (#12971)
* Get rid of static version methods which ignore the AppContext

* Review comments

* Review Comments

* Make branch behave the same as original implementation

* Fix tests
2017-11-10 17:31:18 -08:00
Jason Simmons f44ba8b9c9 Add a flutter doctor --android-licenses command that locates and runs the Android SDK license manager (#9892)
See https://github.com/flutter/flutter/issues/8438
2017-05-09 10:18:45 -07:00
Michael Goderbauer ca4d7211b0 Enforce valid package names on flutter create (#9854)
* Enforce valid package names on flutter create

Fixes #9564

* refactor

* fix other tests
2017-05-08 14:08:59 -07:00
xster 31b958378a Report flutter doctor success/failure (#9664)
* record doctor failures

* fully mock out analytics dependencies
2017-05-08 11:10:36 -07:00
xster 66ed8de745 Record flutter run success/fail, build mode, platform, start time in analytics (#9597)
FlutterCommand.runCommand subclasses can optionally return a FlutterCommandResult which is used to append additional analytics. 

Fix flutter run timing report and add a bunch of dimensional data
2017-04-27 15:28:15 -07:00
Todd Volkert 60c5ffc1a9 Switch many Device methods to be async (#9587)
`adb` can sometimes hang, which will in turn hang the Dart isolate if
we're using `Process.runSync()`. This changes many of the `Device` methods
to return `Future<T>` in order to allow them to use the async process
methods. A future change will add timeouts to the associated calls so
that we can properly alert the user to the hung `adb` process.

This is work towards #7102, #9567
2017-04-25 17:23:00 -07:00
Todd Volkert 83d411f979 Change flutter_tools tests to run via pub (#8698)
`all.dart` is no longer needed. Furthermore, it causes tests to
be skipped, or to silently fail to run anything.

Fixes #7941
2017-03-10 09:39:01 -08:00
Chris Bracken 7a09316cd0 Declare locals final where not reassigned (flutter_tools) (#8570) 2017-03-03 17:50:46 -08:00
Todd Volkert 016b5ab0cc Force all dart:io usage to go through 'base/io.dart' (#7390)
This ensures that accidental usages of dart:io's
file API don't creep in over time.
2017-01-09 08:37:00 -08:00
Todd Volkert 60b19b2035 Create abstraction layer for dart:io's Process commands (#7100)
With this change, they're run via instance methods on an object
obtained through the context. This will allow us to substitute
that object in tests with replay/record versions to allow us to
mock out the os-layer in tests.
2016-11-30 08:42:42 -08:00
John McCutchan 0b737ac57b Remove default AppContext and cleanup globals (#6999) 2016-11-29 07:54:20 -08:00
Dan Rubel 34e466f1fd Refactor flutter command exit code - part 3 of 3 (#6838)
* Remove the workaround that pinned args to v0.13.6
This reverts most of the changes in commit 6331b6c8b5
* throw exception if exit code is not an integer
* rework command infrastructure to throw ToolExit when non-zero exitCode
* convert commands to return Future<Null>
* cleanup remaining commands to use throwToolExit for non-zero exit code
* remove isUnusual exception message
* add type annotations for updated args package
2016-11-14 14:21:30 -05:00
Devon Carew 0b5072c2ef fix check to ignore bots (#4034) 2016-05-19 10:51:31 -07:00
Jason Simmons 32846de9f8 Remove ArtifactStore and move flutterRoot into Cache (#3883) 2016-05-12 15:54:35 -07:00
pq 79d1d3a7c4 Prefer implict equals matcher in test expectations.
@Hixie: as per our conversation, a little more concise.
2016-05-04 13:58:45 -07:00
Devon Carew adac927501 add google analytics to flutter_tools (#3523)
* add google analytics

* send in the run target type

* track device type targets

* use the real GA code

* review comments

* rev to usage 2.0

* rev to 2.2.0 of usage; add tests

* review comments
2016-04-26 16:25:11 -07:00