-
Notifications
You must be signed in to change notification settings - Fork 15
/
analysis_options.yaml
95 lines (89 loc) · 3.21 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
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.
include: package:lints/recommended.yaml
# Uncomment the following section to specify additional rules.
linter:
rules:
- always_use_package_imports
- avoid_print
- avoid_type_to_string
- cancel_subscriptions
- close_sinks
- discarded_futures
- literal_only_boolean_expressions
- no_adjacent_strings_in_list
- no_duplicate_case_values
- test_types_in_equals
- throw_in_finally
- unnecessary_statements
# Style rules
- always_declare_return_types
- always_put_control_body_on_new_line
- always_put_required_named_parameters_first
- avoid_double_and_int_checks
- avoid_field_initializers_in_const_classes
- avoid_js_rounded_ints
- avoid_null_checks_in_equality_operators
- avoid_positional_boolean_parameters
- avoid_returning_this
- avoid_unused_constructor_parameters
- avoid_void_async
- conditional_uri_does_not_exist
- deprecated_consistency
- directives_ordering
- eol_at_end_of_file
- join_return_with_assignment
- missing_whitespace_between_adjacent_strings
- no_runtimeType_toString
- noop_primitive_operations
- one_member_abstracts
- only_throw_errors
- public_member_api_docs
- prefer_asserts_in_initializer_lists
- prefer_asserts_with_message
- prefer_const_constructors
- prefer_const_declarations
- prefer_constructors_over_static_methods
- prefer_double_quotes # Not really a reason to chose " over ', just wanted to stay consistent
- prefer_expression_function_bodies
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals
- prefer_final_parameters
- prefer_if_elements_to_conditional_expressions
- prefer_null_aware_method_calls
# - sort_constructors_first # May enable this one in the future
- type_annotate_public_apis
- unnecessary_lambdas
- unnecessary_parenthesis
- unnecessary_raw_strings
- unnecessary_to_list_in_spreads
- use_enums
- use_if_null_to_convert_nulls_to_bools
- use_is_even_rather_than_modulo
- use_late_for_private_fields_and_variables
- use_named_constants
- use_setters_to_change_properties
- use_string_buffers
- use_super_parameters
- use_to_and_as_if_applicable
# pub rules
- depend_on_referenced_packages # everything that the library uses should also be in the requirements list
- sort_pub_dependencies
analyzer:
exclude:
- example/**
# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints
# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options