forked from jogboms/rijksbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanalysis_options.yaml
56 lines (52 loc) · 1.82 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
include: package:flutter_lints/flutter.yaml
analyzer:
exclude:
- "**/*.g.dart"
- "**/*.freezed.dart"
strong-mode:
implicit-casts: false
implicit-dynamic: false
errors:
# 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
invalid_annotation_target: ignore
linter:
rules:
# All rules from pedantic, already enabled rules are left out
# https://github.com/google/pedantic/blob/master/lib/analysis_options.1.11.0.yaml
- always_declare_return_types
- prefer_single_quotes
- sort_child_properties_last
- unawaited_futures
- unsafe_html
# Additional rules from https://github.com/flutter/flutter/blob/master/analysis_options.yaml
# Not all rules are included
- always_put_control_body_on_new_line
- always_specify_types # also used by Flutter itself, makes it more readable
- avoid_slow_async_io
- cast_nullable_to_non_nullable
- directives_ordering
- missing_whitespace_between_adjacent_strings
- sort_pub_dependencies
- prefer_final_in_for_each
- prefer_final_locals
- prefer_foreach
- prefer_if_elements_to_conditional_expressions
- sort_constructors_first
- sort_unnamed_constructors_first
- test_types_in_equals
- tighten_type_of_initializing_formals
- unnecessary_await_in_return
- unnecessary_null_aware_assignments
- unnecessary_null_checks
- unnecessary_nullable_for_final_variable_declarations
- unnecessary_statements
- use_late_for_private_fields_and_variables
- use_named_constants
- use_raw_strings
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options