flutter/.analysis_options_user

87 lines
2.7 KiB
Plaintext
Raw Normal View History

2016-03-10 21:47:20 +00:00
# Specify analysis options.
#
# Until there are meta linter rules, each desired lint must be explicitly enabled.
# See: https://github.com/dart-lang/linter/issues/288
#
2016-03-10 21:47:20 +00:00
# For a list of lints, see: http://dart-lang.github.io/linter/lints/
# See the configuration guide for more
# https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer
2016-05-20 21:08:46 +00:00
#
# This file contains the analysis options used by "flutter analyze"
# when analyzing code outside the flutter repository.
# It isn't named '.analysis_options' because otherwise editors like Atom
# would use it when analyzing the flutter tool itself.
2016-05-20 21:08:46 +00:00
#
# When editing, make sure you keep /.analysis_options consistent.
2016-03-10 21:47:20 +00:00
analyzer:
language:
enableStrictCallChecks: true
enableSuperMixins: true
2016-03-11 23:18:30 +00:00
strong-mode: true
2016-03-10 21:47:20 +00:00
errors:
# allow overriding fields (if they use super, ideally...)
2016-03-10 21:47:20 +00:00
strong_mode_invalid_field_override: ignore
# allow type narrowing
2016-03-11 23:18:30 +00:00
strong_mode_down_cast_composite: ignore
# allow having TODOs in the code
2016-03-10 21:47:20 +00:00
todo: ignore
2016-05-20 21:08:46 +00:00
2016-03-10 21:47:20 +00:00
linter:
rules:
# these rules are documented on and in the same order as
# the Dart Lint rules page to make maintenance easier
# http://dart-lang.github.io/linter/lints/
2016-05-20 21:08:46 +00:00
# === error rules ===
- avoid_empty_else
- cancel_subscriptions
- close_sinks
2016-05-20 21:08:46 +00:00
# - comment_references # blocked on https://github.com/dart-lang/dartdoc/issues/1153
- control_flow_in_finally
- empty_statements
2016-05-20 21:08:46 +00:00
- hash_and_equals
# - invariant_booleans
# - iterable_contains_unrelated_type
# - list_remove_unrelated_type
# - literal_only_boolean_expressions
2016-05-20 21:08:46 +00:00
- test_types_in_equals
- throw_in_finally
- unrelated_type_equality_checks
- valid_regexps
2016-05-20 21:08:46 +00:00
# === style rules ===
# - always_declare_return_types
# - always_specify_types
# - annotate_overrides
# - avoid_as
- avoid_init_to_null
- avoid_return_types_on_setters
2016-05-20 21:08:46 +00:00
- await_only_futures
2016-03-10 21:47:20 +00:00
- camel_case_types
2016-05-20 21:08:46 +00:00
# - constant_identifier_names # https://github.com/dart-lang/linter/issues/204
2016-03-10 21:47:20 +00:00
- empty_constructor_bodies
- implementation_imports
- library_names
2016-03-10 21:47:20 +00:00
- library_prefixes
- non_constant_identifier_names
# - one_member_abstracts
# - only_throw_errors
# - overridden_fields
- package_api_docs
- package_prefixed_library_names
- prefer_is_not_empty
# - public_member_api_docs
2016-03-10 21:47:20 +00:00
- slash_for_doc_comments
# - sort_constructors_first
# - sort_unnamed_constructors_first
2016-03-10 21:47:20 +00:00
- super_goes_last
2016-05-20 21:08:46 +00:00
# - type_annotate_public_apis # subset of always_specify_types
2016-03-10 21:47:20 +00:00
- type_init_formals
# - unawaited_futures
2016-03-10 21:47:20 +00:00
- unnecessary_brace_in_string_interp
- unnecessary_getters_setters
2016-05-20 21:08:46 +00:00
# === pub rules ===
2016-05-20 21:08:46 +00:00
- package_names