-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanalysis_options.yaml
131 lines (121 loc) · 4.39 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# analyzer:
# # enable-experiment:
# # - non-nullable
# strong-mode:
# implicit-casts: false
# implicit-dynamic: false
# errors:
# missing_return: error
# missing_required_param: error
# invalid_use_of_protected_member: error
# sdk_version_async_exported_from_core: ignore
# linter:
# rules:
# - always_declare_return_types
# 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
#
# 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
#
# There are other similar analysis options files in the flutter repos,
# which should be kept in sync with this file:
#
# - analysis_options.yaml (this file)
# - packages/flutter/lib/analysis_options_user.yaml
# - https://github.com/flutter/plugins/blob/master/analysis_options.yaml
# - https://github.com/flutter/engine/blob/master/analysis_options.yaml
#
# This file contains the analysis options used by Flutter tools, such as IntelliJ,
# Android Studio, and the `flutter analyze` command.
include: all_lint_rules.yaml
analyzer:
strong-mode:
implicit-casts: false
implicit-dynamic: false
errors:
# Otherwise cause the import of all_lint_rules to warn because of some rules conflicts.
# The conflicts are fixed in this file instead, so we can safely ignore the warning.
included_file_warning: ignore
# treat missing required parameters as a warning (not a hint)
missing_required_param: warning
# treat missing returns as a warning (not a hint)
missing_return: warning
# allow having TODOs in the code
todo: ignore
# Ignore analyzer hints for updating pubspecs when using Future or
# Stream and not importing dart:async
# Please see https://github.com/flutter/flutter/pull/24528 for details.
sdk_version_async_exported_from_core: ignore
# Custom errors to be ignored
argument_type_not_assignable: ignore
implicit_dynamic_type: ignore
#invalid_assignment: ignore
implicit_dynamic_map_literal: ignore
always_put_control_body_on_new_line: ignore
exclude:
- "bin/cache/**"
# the following two are relative to the stocks example and the flutter package respectively
# see https://github.com/dart-lang/sdk/issues/28463
- "lib/i18n/messages_*.dart"
- "lib/src/http/**"
linter:
rules:
# navigator.pop inside a closure requires this
unnecessary_lambdas: false
# It's ok
cascade_invocations: false
# Ignored in tests
missing_whitespace_between_adjacent_strings: false
# In the future
type_annotate_public_apis: false
# It's ok
avoid_print: false
# Not including author name in small projects
flutter_style_todos: false
# Sometimes used
avoid_as: false
# Not sure how to address this
use_raw_strings: false
# Need to fix this
comment_references: false
# Ok to use a class
one_member_abstracts: false
# Need to fix this
avoid_annotating_with_dynamic: false
# Disabled for type inference
always_specify_types: false
# non-required Key often precedes required named parameters
always_put_required_named_parameters_first: false
# Catch all often used in project
avoid_catches_without_on_clauses: false
# Ok to be explicit
avoid_redundant_argument_values: false
# Still some instances of this in the project
lines_longer_than_80_chars: false
# Often used in local variables
unnecessary_final: false
# Not always done with factory constructors
sort_constructors_first: false
# Ok to be explicit
omit_local_variable_types: false
# For build methods
prefer_expression_function_bodies: false
# I use double out of habit
prefer_int_literals: false
# sometimes using `with` syntax
prefer_mixin: false
# Codebase uses mostly single quotes
avoid_escaping_inner_quotes: false
prefer_double_quotes: false
# Need to fix this sometime (easier to copy paste files across projects)
prefer_relative_imports: false
# A lot of documentation missing
public_member_api_docs: false
# Not enforced
sort_child_properties_last: false
# Many constructors not declared for widgets that take no arguments
use_key_in_widget_constructors: false