forked from lichess-org/mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
analysis_options.yaml
66 lines (61 loc) · 1.92 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
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:lint/strict.yaml
analyzer:
language:
strict-casts: true
strict-inference: true
strict-raw-types: true
exclude:
- "**/*.g.dart"
- "**/*.freezed.dart"
- lib/src/common/lichess_icons.dart
errors:
invalid_annotation_target: ignore
linter:
rules:
directives_ordering: false
always_use_package_imports: false
avoid_redundant_argument_values: false
sort_pub_dependencies: false
sort_unnamed_constructors_first: false
dart_code_metrics:
rules:
# common
- avoid-collection-methods-with-unrelated-types
- avoid-double-slash-imports
- avoid-redundant-async
- avoid-global-state
- avoid-late-keyword
- avoid-unnecessary-type-assertions
- avoid-unnecessary-type-casts
- avoid-unrelated-type-assertions
- prefer-iterable-of
- prefer-first
- prefer-immediate-return
- prefer-iterable-of
- prefer-last
# flutter
- always-remove-listener
- avoid-border-all
- avoid-returning-widgets:
exclude:
- test/**
ignored-annotations:
- allowedWidgetReturn
- avoid-shrink-wrap-in-lists
- avoid-unnecessary-setstate
- avoid-expanded-as-spacer
- avoid-wrapping-in-padding
- check-for-equals-in-render-object-setters
- consistent-update-render-object
- prefer-const-border-radius
- prefer-correct-edge-insets-constructor
# - prefer-extracting-callbacks
- use-setstate-synchronously