Commit graph

29 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
Alexandre Ardhuin 5169ab5974
format parameter list (#27261) 2019-02-21 09:27:07 +01:00
Greg Spencer 0ff9e8a928
Rename 'application' back to 'module', and make 'app' the default again for templates. (#22888)
We decided that redefining the default for templates was premature. We're going to go back to having "module" in experimental land again, and we'll try again when we have the feature set fully baked.

This keeps the writing of the .metadata files, and writing the template type to them, because that was a good improvement, and there are still a bunch of added tests that improve our coverage.
2018-10-10 11:01:40 -07:00
Alexandre Ardhuin 2d3ff10d62
apply lint prefer_void_to_null in packages/flutter_tools (#22686) 2018-10-05 07:54:56 +02:00
Greg Spencer 9f23866a0a
Rename module --> application in flutter create command. (#22565)
This renames the "module" template to the "application" template, and makes "application" the default. The existing "app" template is now deprecated.

flutter create also now recognizes the type of project in an existing directory, and is able to recreate it without having the template type explicitly specified (although you can still do that). It does this now by first looking in the .metadata file for the new project_type field, and if it doesn't find that, then it looks at the directory structure. Also, the .metadata file is now overwritten even on an existing directory so that 1) the project_type can be added to legacy projects, and 2) the version of Flutter that updated the project last is updated.

I also cleaned up a bunch of things in create_test.dart, added many more tests, and added an example test to the test/ directory in the generated output of the application template.

Fixes #22530
Fixes #22344
2018-10-04 13:03:20 -07:00
Alexandre Ardhuin f62afdcf57
add missing type parameter on methods (#22096) 2018-10-01 21:29:08 +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
Alexandre Ardhuin eda03e2586
re-re-enable lint unnecessary_const (#20103) 2018-08-02 12:02:32 +02:00
Todd Volkert 00aac68e2d
Revert flutter/flutter#19592 (#19861)
It was causing problems rolling Flutter into Fuchsia
2018-07-27 08:44:39 -07:00
Alexandre Ardhuin 27018359d2
re-enable lint unnecessary_const (#19592)
* re-enable lint unnecessary_const

* remove trailling whitespaces

* remove unnecessary const (after merge)
2018-07-23 08:31:48 +02:00
Ian Hickson f630f90d6d
Revert "enable lint unnecessary_const (#19342)" (#19423)
This reverts commit cc1cf13eec.
2018-07-16 13:30:27 -07:00
Alexandre Ardhuin cc1cf13eec
enable lint unnecessary_const (#19342) 2018-07-16 21:43:48 +02:00
jcollins-g ca677011f8
Fix flutter tools packages_test when run off bots (#14692)
* Fix packages tests when run off bots

* Tweak dependencies to make bots happy

* Review comment
2018-02-21 09:54:07 -08:00
Mikkel Nygaard Ravn f526805e20
Fix of flutter packages get in plugin project (#14757) 2018-02-17 21:25:13 +01:00
Mikkel Nygaard Ravn 57779e7e01
Skip new failing test while investigating (#14746)
Merging on red tree to get back to green.
2018-02-16 12:05:37 +01:00
Mikkel Nygaard Ravn 2000435728
Move plugin injection to just after pub get (#14743) 2018-02-16 10:17:28 +01:00
Mikkel Nygaard Ravn c2e1bc0322
Revert "Move plugin injection to just after pub get (#14560)" (#14734)
This reverts commit b3e4976ca2.
2018-02-15 22:55:36 +01:00
Mikkel Nygaard Ravn b3e4976ca2
Move plugin injection to just after pub get (#14560) 2018-02-15 22:17:12 +01:00
Chris Bracken 538ba522ee
Move common process/IO-related mocks to mocks.dart (#14255)
Moves MockProcess, MockStdio and a few other useful mocks from
packages_test.dart to common/mocks.dart. These are useful for testing
code with interactive IO.

This adds a new constructor to MockProcess to provide additional flexibility.
2018-01-24 17:16:30 -08:00
Mikkel Nygaard Ravn c936aa8cd4
One more timeout. Centralize definitions. (#12970) 2017-11-10 15:56:17 +01:00
Mikkel Nygaard Ravn e3d5cbc929
Make timeout more robust (#12969) 2017-11-10 13:51:52 +01:00
Mikkel Nygaard Ravn a836201a74
Raise timeout limit for tests that call pub (#12968) 2017-11-10 12:33:34 +01:00
Alexandre Ardhuin 1fce14a31c enable lint prefer_single_quotes (#12665) 2017-10-22 18:11:36 +02:00
Ian Hickson 89566feeed Run pub with --trace (#12328)
See https://github.com/dart-lang/pub/issues/1714
2017-09-29 17:56:25 -07:00
Mikkel Nygaard Ravn 8303fff8f9 Run pub in interactive mode in flutter packages pub (#11700) 2017-09-06 11:53:39 +02:00
Ian Hickson 292abf7223 "flutter packages pub ..." to passthrough to dart pub (#10044) 2017-05-12 15:40:35 -07:00
Ian Hickson 7c9c5a296c Rearrange tests to more closely match code structure (#10043) 2017-05-12 10:44:52 -07:00
Renamed from packages/flutter_tools/test/packages_test.dart (Browse further)