ente/analysis_options.yaml

48 lines
1.5 KiB
YAML
Raw Normal View History

2021-07-15 03:02:43 +00:00
# For more linters, we can check https://dart-lang.github.io/linter/lints/index.html
# or https://pub.dev/packages/lint (Effective dart)
2021-07-15 03:02:43 +00:00
# use "flutter analyze ." or "dart analyze ." for running lint checks
include: package:lints/recommended.yaml
2021-07-15 01:52:31 +00:00
linter:
rules:
2021-07-15 03:02:43 +00:00
# Ref https://github.com/flutter/packages/blob/master/packages/flutter_lints/lib/flutter.yaml
- avoid_print
- avoid_unnecessary_containers
- avoid_web_libraries_in_flutter
- no_logic_in_create_state
- prefer_const_constructors
- prefer_const_constructors_in_immutables
- prefer_const_declarations
- prefer_const_literals_to_create_immutables
- sized_box_for_whitespace
- use_full_hex_values_for_flutter_colors
- use_key_in_widget_constructors
- avoid_empty_else
- exhaustive_cases
# just style suggestions
2021-07-15 01:52:31 +00:00
- sort_pub_dependencies
2021-07-15 03:02:43 +00:00
- use_rethrow_when_possible
- prefer_double_quotes
- directives_ordering
2021-07-15 01:52:31 +00:00
2021-07-15 01:21:47 +00:00
analyzer:
2021-07-15 01:52:31 +00:00
errors:
2021-07-15 03:02:43 +00:00
avoid_empty_else: error
exhaustive_cases: error
curly_braces_in_flow_control_structures: error
directives_ordering: error
2021-09-05 06:22:12 +00:00
unused_import: warning
prefer_is_empty: warning
2021-07-15 03:02:43 +00:00
use_rethrow_when_possible: info
prefer_const_constructors: ignore # too many warnings
prefer_const_declarations: ignore # too many warnings
prefer_const_constructors_in_immutables: ignore # too many warnings
prefer_double_quotes: ignore # too many warnings
2021-07-26 15:09:13 +00:00
avoid_renaming_method_parameters: ignore # incorrect warnings for `equals` overrides
2021-07-15 03:02:43 +00:00
2021-07-15 01:21:47 +00:00
exclude:
- thirdparty/**