forked from firebase/flutterfire
-
Notifications
You must be signed in to change notification settings - Fork 3
/
analysis_options.yaml
111 lines (89 loc) · 4.01 KB
/
analysis_options.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Copyright 2021 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# in the LICENSE file.
include: all_lint_rules.yaml
analyzer:
# TODO(rrousselGit): disable implicit-cast/implicit-dynamic
errors:
import_of_legacy_library_into_null_safe: ignore
# Otherwise cause the import of all_lint_rules to warn because of some rules conflicts.
# We explicitly enabled even conflicting rules and are fixing the conflict
# in this file
included_file_warning: ignore
exclude:
- packages/**/example/lib/generated_plugin_registrant.dart
linter:
rules:
## currently enabled only for firebase_core
avoid_dynamic_calls: false
## Disabled rules because the repository doesn't respect them (yet)
use_build_context_synchronously: false
directives_ordering: false
prefer_final_fields: false
comment_references: false
sort_constructors_first: false
sort_unnamed_constructors_first: false
always_put_control_body_on_new_line: false
omit_local_variable_types: false
prefer_constructors_over_static_methods: false
prefer_final_locals: false
only_throw_errors: false
prefer_relative_imports: false
non_constant_identifier_names: false
avoid_returning_this: false
avoid_catching_errors: false
constant_identifier_names: false
prefer_function_declarations_over_variables: false
avoid_classes_with_only_static_members: false
avoid_function_literals_in_foreach_calls: false
use_key_in_widget_constructors: false
prefer_mixin: false
public_member_api_docs: false
#############
# Far too verbose, and not that big of a deal when using parameter_assignments
prefer_final_parameters: false
# Personal preference. I don't find it more readable
cascade_invocations: false
# Conflicts with `prefer_single_quotes`
# Single quotes are easier to type and don't compromise on readability.
prefer_double_quotes: false
# Conflicts with `omit_local_variable_types` and other rules.
# As per Dart guidelines, we want to avoid unnecessary types to make the code
# more readable.
# See https://dart.dev/guides/language/effective-dart/design#avoid-type-annotating-initialized-local-variables
always_specify_types: false
# Incompatible with `prefer_final_locals`
# Having immutable local variables makes larger functions more predictible
# so we will use `prefer_final_locals` instead.
unnecessary_final: false
# Not quite suitable for Flutter, which may have a `build` method with a single
# return, but that return is still complex enough that a "body" is worth it.
prefer_expression_function_bodies: false
# Conflicts with the convention used by flutter, which puts `Key key`
# and `@required Widget child` last.
always_put_required_named_parameters_first: false
# This project doesn't use Flutter-style todos
flutter_style_todos: false
# There are situations where we voluntarily want to catch everything,
# especially as a library.
avoid_catches_without_on_clauses: false
# Boring as it sometimes force a line of 81 characters to be split in two.
# As long as we try to respect that 80 characters limit, going slightly
# above is fine.
lines_longer_than_80_chars: false
# Conflicts with disabling `implicit-dynamic`
avoid_annotating_with_dynamic: false
# conflicts with `prefer_relative_imports`
always_use_package_imports: false
# Disabled for now until we have NNBD as it otherwise conflicts with `missing_return`
no_default_cases: false
# False positive, null checks don't need a message
prefer_asserts_with_message: false
# Cumbersome with `context.select`
avoid_types_on_closure_parameters: false
# Too many false positive (builders)
diagnostic_describe_all_properties: false
# false positives (setter-like functions)
avoid_positional_boolean_parameters: false
# Does not apply to providers
prefer_const_constructors_in_immutables: false