91 lines
3.0 KiB
YAML
91 lines
3.0 KiB
YAML
# This file configures the analyzer, which statically analyzes Dart code to
|
|
# check for errors, warnings, and lints.
|
|
#
|
|
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
|
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
|
# invoked from the command line by running `flutter analyze`.
|
|
|
|
# The following line activates a set of recommended lints for Flutter apps,
|
|
# packages, and plugins designed to encourage good coding practices.
|
|
include:
|
|
- package:flutter_lints/flutter.yaml
|
|
|
|
analyzer:
|
|
exclude:
|
|
- 'build/**'
|
|
- '.direnv/**'
|
|
|
|
linter:
|
|
# The lint rules applied to this project can be customized in the
|
|
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
|
# included above or to enable additional rules. A list of all available lints
|
|
# and their documentation is published at https://dart.dev/lints.
|
|
#
|
|
# Instead of disabling a lint rule for the entire project in the
|
|
# section below, it can also be suppressed for a single line of code
|
|
# or a specific dart file by using the `// ignore: name_of_lint` and
|
|
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
|
# producing the lint.
|
|
rules:
|
|
- always_declare_return_types
|
|
- always_use_package_imports
|
|
- annotate_overrides
|
|
- annotate_redeclares
|
|
- avoid_annotating_with_dynamic
|
|
- avoid_bool_literals_in_conditional_expressions
|
|
- avoid_empty_else
|
|
- avoid_null_checks_in_equality_operators
|
|
- avoid_renaming_method_parameters
|
|
- avoid_returning_null_for_void
|
|
- avoid_setters_without_getters
|
|
- avoid_slow_async_io
|
|
- avoid_unnecessary_containers
|
|
- await_only_futures
|
|
- cancel_subscriptions
|
|
- cascade_invocations
|
|
- comment_references
|
|
- directives_ordering
|
|
- discarded_futures
|
|
- empty_constructor_bodies
|
|
- empty_statements
|
|
- eol_at_end_of_file
|
|
- exhaustive_cases
|
|
- invalid_case_patterns
|
|
- only_throw_errors
|
|
- prefer_asserts_in_initializer_lists
|
|
- prefer_asserts_with_message
|
|
- prefer_const_constructors
|
|
- prefer_const_constructors_in_immutables
|
|
- prefer_const_declarations
|
|
- prefer_const_literals_to_create_immutables
|
|
- prefer_contains
|
|
- prefer_final_fields
|
|
- prefer_final_in_for_each
|
|
- prefer_final_locals
|
|
- prefer_final_parameters
|
|
- prefer_single_quotes
|
|
- require_trailing_commas
|
|
- simplify_variable_pattern
|
|
- sized_box_for_whitespace
|
|
- sized_box_shrink_expand
|
|
- test_types_in_equals
|
|
- unnecessary_async
|
|
- unnecessary_breaks
|
|
- unnecessary_getters_setters
|
|
- unnecessary_ignore
|
|
- unnecessary_lambdas
|
|
- unnecessary_late
|
|
- unnecessary_null_checks
|
|
- unnecessary_parenthesis
|
|
- unrelated_type_equality_checks
|
|
- use_enums
|
|
- use_is_even_rather_than_modulo
|
|
- use_key_in_widget_constructors
|
|
- use_named_constants
|
|
- use_null_aware_elements
|
|
- valid_regexps
|
|
- var_with_no_type_annotation
|
|
|
|
# Additional information about this file can be found at
|
|
# https://dart.dev/guides/language/analysis-options
|