Commit graph

148 commits

Author SHA1 Message Date
Zachary Anderson cbcd1321ed
Revert "enable unnecessary_string_escapes and use_raw_strings (#68302)" (#68714)
This reverts commit ae06c19a37.
2020-10-21 08:16:13 -07:00
Alexandre Ardhuin ae06c19a37
enable unnecessary_string_escapes and use_raw_strings (#68302) 2020-10-21 16:34:24 +02:00
Alexandre Ardhuin c0176c9ee5
use_is_even_rather_than_modulo (#68301) 2020-10-16 20:20:00 +02:00
Alexandre Ardhuin 73301a35a2
Sync lints (#68136) 2020-10-15 15:37:04 -07:00
Alexandre Ardhuin 4acc790252
enable lint cast_nullable_to_non_nullable (#67629) 2020-10-08 21:05:43 +02:00
Alexandre Ardhuin d2858f00dd
enable null_check_on_nullable_type_parameter and tighten_type_of_initializing_formals (#67557)
* enable null_check_on_nullable_type_parameter and tighten_type_of_initializing_formals

* fix CI
2020-10-08 09:39:13 +02:00
Phil Quitslund 1fef5912cf
disable pub lints (#66522)
* disable pub lints

* + comments
2020-09-23 21:37:08 -07:00
Alexandre Ardhuin 71c1f6c3e4
enable lint unnecessary_nullable_for_final_variable_declarations (#66387) 2020-09-23 06:39:47 +02:00
Ian Hickson 8a6a76a334
migrate rendering to nullsafety (#64621) 2020-08-27 16:38:10 -07:00
Christopher Fujino 5cfb16b193
Re-land "Deprecate WhitelistingTextInputFormatter and BlacklistingTextInputFormatter (#59120)" (#59876)
This relands #59120, which was reverted in #59870.
2020-06-19 12:03:38 -07:00
Christopher Fujino 0d7ff7a9e7
Revert "Deprecate WhitelistingTextInputFormatter and BlacklistingTextInputFormatter (#59120)" (#59870)
This reverts commit 8665e13801.
2020-06-19 10:52:52 -07:00
Ian Hickson 8665e13801
Deprecate WhitelistingTextInputFormatter and BlacklistingTextInputFormatter (#59120) 2020-06-18 18:08:01 -07:00
Alexandre Ardhuin f5a9902577
enable avoid_equals_and_hash_code_on_mutable_classes (#52507) 2020-04-06 13:36:01 -07:00
Alexandre Ardhuin c2ae654ddf
enable avoid_single_cascade_in_expression_statements (#51944) 2020-03-05 08:03:26 +01:00
Alexandre Ardhuin 0bd45bc222
update lint list + enable unnecessary_string_interpolations (#50593) 2020-02-14 09:43:52 +01:00
Ian Hickson e2b169ebd3 Apply void_checks lint. (#48267) 2020-01-13 10:03:01 -08:00
Alexandre Ardhuin a541934125 enable lint prefer_for_elements_to_map_fromIterable (#47726) 2020-01-08 08:03:02 -08:00
Alexandre Ardhuin 4f9b6cf017
enable lint prefer_final_in_for_each (#47724) 2020-01-07 16:32:04 +01:00
Alexandre Ardhuin 4adad2c652
update list of lints (#47661) 2019-12-23 18:40:56 +01:00
Alexandre Ardhuin 78db965642 Reland implicit-casts: false (#47431) 2019-12-19 02:23:01 -08:00
Lau Ching Jun a4858782da
Revert "implicit-casts: false (#47199)" (#47428)
This reverts commit c235998acf.
2019-12-18 23:53:00 -08:00
Alexandre Ardhuin c235998acf implicit-casts: false (#47199) 2019-12-18 23:23:01 -08:00
Alexandre Ardhuin e6935efdf6
remove avoid_as lint for the upcoming implicit-casts: false (#45527) 2019-11-25 21:03:29 +01:00
Shi-Hao Hong 3e4bf5757d
Update Stocks example using i18n tool (#44223)
* Use l10n tool to generate stocks i18n files

* Rename *_en_EN.arb to *_en_US.arb

* Fix l10n script
2019-11-06 12:52:03 -08:00
Alexandre Ardhuin df4bf453ab
more UI-as-code (#35516) 2019-09-17 16:23:44 +02:00
Alexandre Ardhuin b041a589c8
enable lint prefer_if_null_operators (#35745) 2019-07-09 10:53:35 +02:00
Alexandre Ardhuin 919dcf53f3
enable lints prefer_spread_collections and prefer_inlined_adds (#35189) 2019-06-27 21:23:16 +02:00
Alexandre Ardhuin b5ce06163c
enable lint use_full_hex_values_for_flutter_colors (#35056) 2019-06-25 17:58:19 +02:00
Alexandre Ardhuin fecf99ff1e
enable lint avoid_bool_literals_in_conditional_expressions (#35055) 2019-06-25 17:40:05 +02:00
Alexandre Ardhuin 9a3a7490c8
sync lint list (#35017) 2019-06-25 15:59:15 +02:00
Alexandre Ardhuin c0125cb44a
fix bad lint commented out (#33026) 2019-05-20 17:00:45 +02:00
Alexandre Ardhuin 4fa32df141
use null aware operators (#32711)
* use null aware operators

* rollback changes about null-aware operator

* disable lint prefer_is_not_empty
2019-05-16 22:25:51 +02:00
Alexandre Ardhuin 41b9abdc32
enable lint prefer_null_aware_operators (#32686) 2019-05-14 22:34:49 +02:00
Dan Field fe9512fa72
Re-enable const (#31600)
* Re-enable const
2019-04-29 16:02:42 -07:00
Dan Field 06e1f8fc15
Roll engine to 3e47b4bb39bb4993f03a278ea7b1c11ee6459b06 (#31569)
* Manual roll with updated test
2019-04-24 17:20:02 -07:00
Phil Quitslund 802eca29d2
set literal conversions (#27811) 2019-03-06 11:05:16 -08:00
Jason Simmons b6996ef326 Disable prefer_collection_literals in the analyzer until we can update to using set literals (#28024) 2019-02-15 15:54:16 -08:00
Phil Quitslund 9e3a0d30c9
remove super_goes_last (#27690)
In Dart 2, it is a compile-time error if a superinitializer
appears in an initializer list at any other position than at the end so this
rule is made redundant by the Dart analyzer's basic checks and is no longer
necessary.
2019-02-08 13:46:01 -08:00
Dan Field 8af3e480a9
Revert "move analysis_options to package" (#26436)
* Revert "move analysis_options to package (#26244)"

This reverts commit d4d1b29a35.
2019-01-11 13:38:02 -08:00
Dan Field d4d1b29a35
move analysis_options to package (#26244)
* move analysis_options to package
2019-01-10 18:53:01 -08:00
Alexandre Ardhuin 3a37b9e0f5
update lint list (#25922) 2019-01-06 21:07:41 +01:00
Siva b1109226d8
Address code review comment. (#25995) 2019-01-03 10:55:50 -08:00
Alexander Aprelev fe1a51ab89
Flutter engine roll with dart roll (#25815) 2018-12-27 14:55:07 -08:00
Paul Berry 280bbefd29
Remove deprecated lint "prefer_bool_in_asserts". (#24890)
In Dart 2, asserts no longer accept non-bool values so this rule is
made redundant by the Dart analyzer's basic checks and is no longer
necessary.

The rule will be removed in a future Linter release.
2018-12-10 13:43:02 -08:00
Alexandre Ardhuin 79b5e5bc8a
Add missing lints (#24381)
* update lint list

* enable sort_pub_dependencies

* enable avoid_returning_null_for_void

* enable flutter_style_todos
2018-11-19 10:37:55 +01:00
Yegor 3fbd140e77
Use new mixin syntax for super-mixins (#22870)
This re-lands 3c56e6c on top of a new Dart SDK that contains new mixin syntax fixes.
2018-10-17 13:10:05 -07:00
Alexandre Ardhuin 936dea28da
enable lint prefer_void_to_null (#23174)
* enable lint prefer_void_to_null

* replace last Null by void
2018-10-17 08:09:29 +02:00
Yegor 3184b7cb66
Revert "Use mixin syntax for Flutter's super-mixins (#22435)" (#22748)
This reverts commit 3c56e6c77d.

It breaks the AOT build.
2018-10-05 15:09:38 -07:00
Yegor 3c56e6c77d
Use mixin syntax for Flutter's super-mixins (#22435)
* first pass

* revert WidgetsBindingObserver

* disable prefer_mixin

* docs and more mixins

* newer engine; binding fixes

* upgrade dependencies

* fix test binding

* remove whitespace

* remove the obsolete `enableSuperMixins: true`

* upgrade dartdoc to 0.22.0

* temporarily use git version of dartdoc

* fix pub global activate syntax

* use dartdoc 0.23.0
2018-10-05 14:54:41 -07:00
Alexandre Ardhuin a07d3719a1
enable lint prefer_generic_function_type_aliases (#21680) 2018-09-14 21:06:19 +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
Alexandre Ardhuin 774ca2f197
enable lint avoid_void_async (#21652) 2018-09-11 07:14:04 +02:00
Alexandre Ardhuin bd1e5a361b
add missing lints (#21620) 2018-09-10 10:27:01 +02:00
Ian Hickson 53b635817c
Re-enable missing_return (#20844) 2018-08-28 11:22:57 -07:00
Ian Hickson b7261586e5
Audit TODO syntax (#20837)
Fixes the pattern for some TODOs to match our style guide.

(Also, a couple of minor code order fixes.)
2018-08-21 14:02:11 -07:00
Ian Hickson ad1eaff45a
flutter analyze cleanup (#20490)
* `flutter analyze` cleanup

* Make `--dartdocs` work in all modes.
* Make `analyze-sample-code.dart` more resilient.
* Add a test for `analyze-sample-code.dart`.
* Minor cleanup in related code and files.

* Apply review comments

* Fix tests
2018-08-20 12:51:07 -07:00
Ian Hickson 8c79f40d71
Fixes resulting from audit of issues links (#20772)
* Fixes resulting from audit of issues links

I looked at every link to GitHub in our repo. For cases where we had a TODO that was waiting for a bug to be fixed, and the bug has now been fixed, I applied the pending change. For cases where the link was out of date, I updated the link.

* Update run_test.dart

skip this test again since it failed on linux and macos bots
2018-08-18 16:44:39 -07:00
Michael R Fairhurst e77b186abd Enable lint unnecessary_statements. Codebase is compliant. (#20099)
* Enable lint unnecessary_statements. Codebase is compliant.

* Fix mega_gallery generated code to not generate unecessary statements

* Fix lint in mega gallery changes

* Enable unnecessary_statements for users as well as repo.
2018-08-06 16:31:57 -07:00
Alexandre Ardhuin eda03e2586
re-re-enable lint unnecessary_const (#20103) 2018-08-02 12:02:32 +02:00
Aart Bik 724b92499e
Dart SDK roll for 8/1/2018 (#20120)
* Dart SDK roll for 8/1/2018

Dart SDK roll and disabling of return warnings as errors.

List of commits included in this roll:

8bad5c7b29 [vm/compiler] Non-speculative X64 long division/remainder.
918cda18c5 Add docs about sourcemap extensions
329e029bd6 Fixes dart-lang/sdk#34035
12326c10e1 Store constructor field initializera when the target is not a field.
50da4b8d92 Skip ShadowInvalidFieldInitializer while resynthesizing constructor initializers.
8810b6ecc7 Translate kernel.Instantiation in constant expressions.
cb7341fceb Initial support for inlining-data in source-maps.
4206131030 Fix tracking of onStep position of arguments to new expression
384b0a9a73 Issue 34038. Fix resynthesizing imports when mixed with exports.
ba7dbcf412 Update the test output processor to produce more useful analysis
4b2ee8e9a5 Improve catch clause recovery
66500de4dc More fixes to the CFE integration tests
3f2251986d CC sra also in changes to compiler files and tests
4734c55882 Report error on unsupported operators
00e3109368 [VM] Adjust flags for creating depfiles
07c462b471 [vm] Refactoring: extract BaseFlowGraphBuilder to a separate file
ff9167ff7b Fix parseDirectives to recognize metadata
079bebb78b [ VM ] Added missing token position for assert statements
174649b9be [gardening] Update status of dissasemble_test on Windows
8c5aca7d4d Remove the Factory interface
3dc201e168 Update ChangeBuilder to not include empty edits (Take 2)
18047b2757 Refactor test.dart by changing class Configuration to TestConfiguration
7373d38a31 Update status for Dart2js minified CSP on Chrome with fast startup
61148eade8 Update mixin-declaration feature specification.
a98feb0f01 [VM interpreter] Fix exception handling. Convert bytecode indices to pc offsets ....
da2ed2fd59 Don't ignore runtime cast failures on Map<K,V>.
3d8ca8e566 [gardening] Increase debug app-jitk timeout
0313f7bd66 [gardening] Update status file for failing test
6c39bc38f3 Clear ShadowX references that are not required after compilation.
05b9bbd2b5 Remove the dart1 version of the analysis server snapshot.
9107399190 Add back in the analysis server training.
9fb6c09015 Store reference/type for invalid types.
21db860271 Remove non-strong dart2js builders from test_matrix.json
2e7b0a13f1 Add support for accessing all of the created contexts
73663ae7c6 Allow void on the RHS of null coalescing expressions
17cb6d95d1 Don't remember TypeEnvironment in resolution results.
72960de5f9 [VM] Fix one more place where bound error allocation happened on BG thread in new space
6ad79ff4bd Update status file for tests passing under CFE
23ba527735 [VM] Ensure to alloate bound errors in old space on BG compiler
fe8052428b Remove CONTENT_MODIFIED from spec/test for getSignature
c4c847a45c Revert "[CQ] Remove pkg-linux-release from the CQ trybots until it is fixed"
beaf05efa3 [vm] When generating JITDUMP also dump IR and attach it as source to code.
24158b773d [vm/compiler] Do not LICM LoadStaticField for uninitialized fields.
68bfaf3ac3 [vm/compiler] Avoid crashes when canonicalizing unreachable AssertAssignable.
5a45b2a62b [infra] Upgrade homebrew dependencies to work on Dart 2
8e287dc037 [VM] Only add direct implementor when reading script snapshots if ....
6e81d74fcc [VM] Optimize generation of type testing stubs in JIT mode.
058510eeab fix #28233, add hint for missing returns to function expressions
4482d13ff7 [vm/compiler] Bug fix in 64-bit MOD (%) operator.

* Try ignore instead of commenting out.

* Also disable this in package analysis options.
2018-08-01 21:57:53 -07: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
Chris Bracken 2ae48845a8
Revert elimination of Dart 1 (#18460)
fuchsia_tester.dart still assumes Dart 1. Previously, it ran tests directly
from source, flutter_platform.dart automatically runs a kernel compile when
operating in Dart 2 mode, but this assumes a functional Dart SDK is available
in the artifacts directly, and fuchsia_tester.dart mocks out the artifacts
directory with an empty temp dir.

Remaining work is:
1. Get the frontend server building as a dependency on Fuchsia.
2. Patch fuchsia_tester.dart to use a valid Dart SDK and frontend server.

This also reverts migration to Dart 2 typedef syntax.

This reverts commit 6c56bb2. (#18362)
This reverts commit 3daebd0. (#18316)
2018-06-13 12:46:39 -07:00
Alexandre Ardhuin e45836f271
enable lint avoid_field_initializers_in_const_classes (#18415) 2018-06-13 07:20:18 +02:00
Greg Spencer 6c56bb2420
Update typedef syntax to use Function notation and turn on lint for old notation. (#18362)
Now that Dart 1 is turned off, reapplying my change to turn on the prefer_generic_function_type_aliases analysis option, and fix all the typedefs to Dart 2 preferred syntax.

Also eliminated the unused analysis_options_repo.yaml file and turned on public_member_api_docs in analysys_options.yaml.

No logic changes, just changing the typedef syntax for all typedefs, and updating analysis options.
2018-06-11 15:51:45 -07:00
Alexandre Ardhuin 09276bea25
enable lint prefer_equal_for_default_values (#18156) 2018-06-05 08:50:40 +02:00
Alexandre Ardhuin 6e06fd2d1b
update some lints comments (#18058) 2018-05-31 17:49:28 +02:00
Alexandre Ardhuin b7fd1d8b8d
add missing lints available in 0.1.51 (#18034) 2018-05-31 08:33:13 +02:00
Greg Spencer b921fdc58e
Revert "Update typedef syntax to use Function notation and turn on lint for old notation. (#18035)" (#18041)
This reverts commit 3258602073.
2018-05-30 13:51:14 -07:00
Greg Spencer 3258602073
Update typedef syntax to use Function notation and turn on lint for old notation. (#18035)
Fixes #18028

Just changes typedef declarations, no logic changes.
2018-05-30 12:13:58 -07:00
Devon Carew 09dec7f508
re-write flutter analyze to use the analysis server (#16979)
re-write flutter analyze (the single-shot and --flutter-repo) to use the analysis server
2018-05-10 09:48:40 -07:00
Alexandre Ardhuin c103fd0c02
disable avoid_private_typedef_functions lint (#16495) 2018-04-16 22:43:47 +02:00
Devon Carew 071485258f
Revert "re-write flutter analyze (the single-shot and --flutter-repo) to use the analysis server (#16281)" (#16482)
This reverts commit 2f41ea546f.
2018-04-11 16:49:38 -07:00
Devon Carew 2f41ea546f
re-write flutter analyze (the single-shot and --flutter-repo) to use the analysis server (#16281)
re-write flutter analyze (the single-shot and --flutter-repo) to use the analysis server
2018-04-11 14:50:36 -07:00
Alexandre Ardhuin f8998091c8
Add new lints added by linter-0.1.45 and linter-0.1.46 (#16094)
* add new lints from linter-0.1.45

* add new lints from linter-0.1.46
2018-04-03 08:51:23 +02:00
Alexandre Ardhuin 061352918b
enable lint avoid_relative_lib_imports (#15780) 2018-03-22 07:56:18 +01:00
Alexandre Ardhuin 217b2bdaa1
add new lints of linter-0.1.44 and enable unnecessary_parenthesis (#15585) 2018-03-21 07:10:14 +01:00
Alexandre Ardhuin 3961306bad enable lints prefer_const_declarations and prefer_const_literals_to_create_immutables (#14848) 2018-03-09 14:37:06 -08:00
Alexandre Ardhuin fe26c9d87b
complete lint list for linter-0.1.43 (#14707) 2018-02-16 07:44:24 +01:00
Alexandre Ardhuin b8fcc96265
activate lint prefer_bool_in_asserts (#14708) 2018-02-15 06:14:13 +01:00
Michael Thomsen 62ea62a729
Remove enableAssertInitializer from analysis options as it's not needed in Dart 2 (#14042) 2018-01-11 16:52:34 +01:00
Alexandre Ardhuin c358898a76
try lint avoid_unused_constructor_parameters (#13250) 2017-11-30 09:20:53 +01:00
Alexandre Ardhuin 1d7a22fba0
sort lints to make maintenance easier (#13231) 2017-11-29 07:54:44 +01:00
Michael Thomsen 5ecbc92b1a
Update tools reference (#13151) 2017-11-23 09:17:29 +01:00
Alexandre Ardhuin aefc62f8f3
try some lints (#12719)
* try some lints

* remove avoid_returning_this rule
2017-11-10 07:49:44 +01:00
Alexandre Ardhuin 436aa93086
enable lint avoid_classes_with_only_static_members (#12602) 2017-11-09 07:12:36 +01:00
Alexandre Ardhuin 15601fe55c
Enable lint prefer asserts in initializer lists (#12903)
* enable lint prefer_asserts_in_initializer_lists

* enable --assert-initializer
2017-11-08 22:59:49 +01:00
Alexandre Ardhuin c9b94e1412 enable lint prefer_const_constructors_in_immutables (#12693)
* enable lint prefer_const_constructors_in_immutables

* remove LabeledGlobalKey._
2017-10-25 11:20:36 +02:00
Alexandre Ardhuin 28366002d9 enable lint prefer_foreach (#12674)
* enable lint prefer_foreach

* fix tests
2017-10-25 08:25:44 +02:00
Alexandre Ardhuin 872d83a3c5 enable lint prefer_conditional_assignment (#12694) 2017-10-25 08:18:26 +02:00
Alexandre Ardhuin 1fce14a31c enable lint prefer_single_quotes (#12665) 2017-10-22 18:11:36 +02:00
Alexandre Ardhuin ce6f8d3a83 comment some lint exclusions (#12601) 2017-10-19 08:33:01 +02:00
Alexandre Ardhuin 700dc9f752 enable lint avoid_function_literals_in_foreach_calls (#12607) 2017-10-19 08:16:16 +02:00
Alexandre Ardhuin 0783ec906b Enable lints (#11891)
* enable lint prefer_final_fields

* enable lint recursive_getters

* enable lint unnecessary_overrides
2017-09-01 22:18:51 +02:00
Alexandre Ardhuin bb4f4070f9 Prefer const constructors (#11853)
* upgrade to linter-0.1.35

* re-enable lint prefer_const_constructors

* address review comments
2017-08-31 08:55:21 +02:00
Dan Rubel 3a31c35ba0 Rename .analysis_options to analysis_options.yaml (#11594) 2017-08-15 08:46:42 -04:00
Renamed from .analysis_options (Browse further)