From 7cf47ca41fdd9172112853e26f8ff792727745ea Mon Sep 17 00:00:00 2001 From: Dan Rubel Date: Fri, 9 Sep 2016 15:18:18 -0400 Subject: [PATCH] new flutter repo level analysis options (#5786) This adds and enables a raft of new analysis options for the flutter repository, many of which are commented out until we clean up our code and/or address any linter false positives. --- .analysis_options | 9 +++++++++ .analysis_options_flutter_analyze | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/.analysis_options b/.analysis_options index 7236e04334..598aad8309 100644 --- a/.analysis_options +++ b/.analysis_options @@ -38,12 +38,19 @@ linter: # === error rules === - avoid_empty_else # - comment_references # blocked on https://github.com/dart-lang/dartdoc/issues/1153 + # - cancel_subscriptions # https://github.com/flutter/flutter/issues/5788 + # - close_sinks # https://github.com/flutter/flutter/issues/5789 - control_flow_in_finally + - empty_statements - hash_and_equals + # - invariant_booleans # https://github.com/flutter/flutter/issues/5790 # - iterable_contains_unrelated_type + - list_remove_unrelated_type + # - literal_only_boolean_expressions # https://github.com/flutter/flutter/issues/5791 - test_types_in_equals - throw_in_finally - unrelated_type_equality_checks + - valid_regexps # === style rules === - always_declare_return_types @@ -62,6 +69,7 @@ linter: - library_prefixes - non_constant_identifier_names - one_member_abstracts + # - only_throw_errors # https://github.com/flutter/flutter/issues/5792 # - overridden_fields - package_api_docs - package_prefixed_library_names @@ -73,6 +81,7 @@ linter: - super_goes_last # - type_annotate_public_apis # subset of always_specify_types - type_init_formals + # - unawaited_futures # https://github.com/flutter/flutter/issues/5793 - unnecessary_brace_in_string_interp - unnecessary_getters_setters diff --git a/.analysis_options_flutter_analyze b/.analysis_options_flutter_analyze index e9799e7de5..94403033be 100644 --- a/.analysis_options_flutter_analyze +++ b/.analysis_options_flutter_analyze @@ -39,12 +39,19 @@ linter: # === error rules === - avoid_empty_else # - comment_references # blocked on https://github.com/dart-lang/dartdoc/issues/1153 + # - cancel_subscriptions # https://github.com/flutter/flutter/issues/5788 + # - close_sinks # https://github.com/flutter/flutter/issues/5789 - control_flow_in_finally + - empty_statements - hash_and_equals + # - invariant_booleans # https://github.com/flutter/flutter/issues/5790 # - iterable_contains_unrelated_type + - list_remove_unrelated_type + # - literal_only_boolean_expressions # https://github.com/flutter/flutter/issues/5791 - test_types_in_equals - throw_in_finally - unrelated_type_equality_checks + - valid_regexps # === style rules === - always_declare_return_types @@ -63,6 +70,7 @@ linter: - library_prefixes - non_constant_identifier_names - one_member_abstracts + # - only_throw_errors # https://github.com/flutter/flutter/issues/5792 # - overridden_fields - package_api_docs - package_prefixed_library_names @@ -74,6 +82,7 @@ linter: - super_goes_last # - type_annotate_public_apis # subset of always_specify_types - type_init_formals + # - unawaited_futures # https://github.com/flutter/flutter/issues/5793 - unnecessary_brace_in_string_interp - unnecessary_getters_setters