forked from dart-lang/dart_style
-
Notifications
You must be signed in to change notification settings - Fork 0
/
analysis_options.yaml
32 lines (31 loc) · 974 Bytes
/
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
include: package:dart_flutter_team_lints/analysis_options.yaml
analyzer:
errors:
comment_references: ignore
linter:
rules:
# Either "unnecessary_final" or "prefer_final_locals" should be used so
# that the codebase consistently uses either "var" or "final" for local
# variables. Choosing the former because the latter also requires "final"
# even on local variables and pattern variables that have type annotations,
# as in:
#
# final Object upcast = 123;
# //^^^ Unnecessarily verbose.
#
# switch (json) {
# case final List list: ...
# // ^^^^^ Unnecessarily verbose.
# }
#
# Using "unnecessary_final" allows those to be:
#
# Object upcast = 123;
#
# switch (json) {
# case List list: ...
# }
#
# Also, making local variables non-final is consistent with parameters,
# which are also non-final.
- unnecessary_final