ente/mobile/analysis_options.yaml

76 lines
2.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
2022-07-03 08:56:13 +00:00
include: package:flutter_lints/flutter.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
# Ref https://dart-lang.github.io/linter/lints/
2021-07-15 03:02:43 +00:00
- 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
2022-08-29 14:43:31 +00:00
- prefer_final_locals
- require_trailing_commas
2021-07-15 03:02:43 +00:00
- sized_box_for_whitespace
- use_full_hex_values_for_flutter_colors
- use_key_in_widget_constructors
2022-07-03 10:09:01 +00:00
- cancel_subscriptions
2021-07-15 03:02:43 +00:00
2021-07-15 03:02:43 +00:00
- 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
- always_use_package_imports
- sort_child_properties_last
- unawaited_futures
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
require_trailing_commas: error
2022-11-06 09:18:54 +00:00
always_use_package_imports: warning
2021-10-30 06:19:18 +00:00
prefer_final_fields: error
2022-02-04 05:34:09 +00:00
unused_import: error
2022-07-03 10:09:01 +00:00
camel_case_types: error
prefer_is_empty: warning
2021-07-15 03:02:43 +00:00
use_rethrow_when_possible: info
2022-07-03 07:47:15 +00:00
unused_field: warning
use_key_in_widget_constructors: warning
2022-07-03 09:27:51 +00:00
sort_child_properties_last: warning
2022-07-12 05:40:36 +00:00
sort_pub_dependencies: warning
2022-07-03 09:45:00 +00:00
library_private_types_in_public_api: warning
2022-07-03 10:09:01 +00:00
constant_identifier_names: warning
2022-07-04 06:02:17 +00:00
prefer_const_constructors: warning
prefer_const_declarations: warning
prefer_const_constructors_in_immutables: warning
2022-11-06 08:34:06 +00:00
prefer_final_locals: warning
2022-07-04 06:02:17 +00:00
unnecessary_const: error
2022-07-03 10:09:01 +00:00
cancel_subscriptions: error
unrelated_type_equality_checks: error
2022-07-03 07:47:15 +00:00
2023-12-02 11:42:52 +00:00
unawaited_futures: warning # convert to warning after fixing existing issues
2022-11-06 08:22:54 +00:00
invalid_dependency: info
2022-07-03 09:27:51 +00:00
use_build_context_synchronously: ignore # experimental lint, requires many changes
prefer_interpolation_to_compose_strings: ignore # later too many warnings
2021-07-15 03:02:43 +00:00
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/**
2023-04-18 09:00:47 +00:00
- lib/generated/**