|
| 1 | +include: package:flutter_lints/flutter.yaml |
| 2 | + |
| 3 | +linter: |
| 4 | + rules: |
| 5 | + - always_declare_return_types |
| 6 | + - always_put_control_body_on_new_line: false |
| 7 | + - always_put_required_named_parameters_first: false |
| 8 | + - always_require_non_null_named_parameters: false # deprecated |
| 9 | + - always_specify_types: false |
| 10 | + - always_use_package_imports |
| 11 | + - annotate_redeclares |
| 12 | + - avoid_annotating_with_dynamic: false # May conflict with always_declare_return_types |
| 13 | + - avoid_bool_literals_in_conditional_expressions |
| 14 | +# - avoid_catches_without_on_clauses |
| 15 | +# - avoid_catching_errors |
| 16 | + - avoid_classes_with_only_static_members: false |
| 17 | + - avoid_double_and_int_checks |
| 18 | + - avoid_dynamic_calls |
| 19 | + - avoid_equals_and_hash_code_on_mutable_classes |
| 20 | + - avoid_escaping_inner_quotes |
| 21 | + - avoid_field_initializers_in_const_classes |
| 22 | + - avoid_final_parameters |
| 23 | + - avoid_implementing_value_types |
| 24 | + - avoid_js_rounded_ints |
| 25 | + - avoid_multiple_declarations_per_line |
| 26 | + - avoid_positional_boolean_parameters: false |
| 27 | + - avoid_private_typedef_functions |
| 28 | + - avoid_redundant_argument_values: false |
| 29 | + - avoid_returning_null: false # deprecated |
| 30 | + - avoid_returning_null_for_future |
| 31 | + - avoid_returning_this |
| 32 | + - avoid_setters_without_getters: false |
| 33 | + - avoid_slow_async_io |
| 34 | + - avoid_type_to_string |
| 35 | + - avoid_types_on_closure_parameters |
| 36 | + - avoid_unstable_final_fields |
| 37 | + - avoid_unused_constructor_parameters |
| 38 | + - avoid_void_async |
| 39 | + - cancel_subscriptions |
| 40 | +# - cascade_invocations |
| 41 | + - cast_nullable_to_non_nullable |
| 42 | + - close_sinks |
| 43 | + - collection_methods_unrelated_type |
| 44 | + - combinators_ordering |
| 45 | + - comment_references |
| 46 | + - conditional_uri_does_not_exist |
| 47 | + - dangling_library_doc_comments: false |
| 48 | + - deprecated_consistency |
| 49 | + - deprecated_member_use_from_same_package: false |
| 50 | +# - diagnostic_describe_all_properties |
| 51 | + - directives_ordering |
| 52 | + - discarded_futures: false |
| 53 | + - do_not_use_environment |
| 54 | + - eol_at_end_of_file |
| 55 | + - flutter_style_todos: false |
| 56 | + - implicit_call_tearoffs |
| 57 | + - implicit_reopen |
| 58 | + - invalid_case_patterns |
| 59 | + - join_return_with_assignment |
| 60 | + - leading_newlines_in_multiline_strings |
| 61 | + - library_annotations |
| 62 | + - lines_longer_than_80_chars: false |
| 63 | + - literal_only_boolean_expressions |
| 64 | + - matching_super_parameters |
| 65 | + - missing_whitespace_between_adjacent_strings |
| 66 | + - no_adjacent_strings_in_list |
| 67 | + - no_default_cases: false |
| 68 | + - no_literal_bool_comparisons |
| 69 | + - no_runtimeType_toString |
| 70 | + - no_self_assignments |
| 71 | + - no_wildcard_variable_uses |
| 72 | + - noop_primitive_operations |
| 73 | + - omit_local_variable_types |
| 74 | + - one_member_abstracts |
| 75 | + - only_throw_errors |
| 76 | + - package_api_docs: false |
| 77 | + - parameter_assignments |
| 78 | + - prefer_asserts_in_initializer_lists |
| 79 | + - prefer_asserts_with_message |
| 80 | + - prefer_constructors_over_static_methods |
| 81 | + - prefer_double_quotes: false # Conflicts with prefer_single_quotes |
| 82 | + - prefer_expression_function_bodies: false |
| 83 | + - prefer_final_in_for_each |
| 84 | + - prefer_final_locals |
| 85 | + - prefer_final_parameters: false |
| 86 | + - prefer_foreach |
| 87 | + - prefer_if_elements_to_conditional_expressions |
| 88 | + - prefer_int_literals |
| 89 | + - prefer_mixin |
| 90 | + - prefer_null_aware_method_calls |
| 91 | + - prefer_relative_imports: false |
| 92 | + - prefer_single_quotes |
| 93 | +# - public_member_api_docs |
| 94 | + - require_trailing_commas: false |
| 95 | + - secure_pubspec_urls |
| 96 | + - sized_box_shrink_expand |
| 97 | + - sort_constructors_first |
| 98 | + - sort_pub_dependencies |
| 99 | + - sort_unnamed_constructors_first |
| 100 | + - test_types_in_equals |
| 101 | + - throw_in_finally |
| 102 | + - tighten_type_of_initializing_formals |
| 103 | +# - type_annotate_public_apis |
| 104 | + - type_literal_in_constant_pattern |
| 105 | + - unawaited_futures |
| 106 | + - unnecessary_await_in_return |
| 107 | + - unnecessary_breaks |
| 108 | + - unnecessary_final: false |
| 109 | + - unnecessary_lambdas |
| 110 | + - unnecessary_library_directive |
| 111 | + - unnecessary_null_aware_operator_on_extension_on_nullable |
| 112 | + - unnecessary_null_checks |
| 113 | + - unnecessary_parenthesis |
| 114 | + - unnecessary_raw_strings |
| 115 | + - unnecessary_statements |
| 116 | + - unnecessary_to_list_in_spreads |
| 117 | + - unreachable_from_main: false |
| 118 | + - unsafe_html |
| 119 | + - use_colored_box |
| 120 | + - use_decorated_box |
| 121 | + - use_enums |
| 122 | + - use_if_null_to_convert_nulls_to_bools: false |
| 123 | + - use_is_even_rather_than_modulo |
| 124 | + - use_late_for_private_fields_and_variables |
| 125 | + - use_named_constants |
| 126 | + - use_raw_strings |
| 127 | +# - use_setters_to_change_properties |
| 128 | + - use_string_buffers |
| 129 | + - use_string_in_part_of_directives |
| 130 | + - use_super_parameters |
| 131 | + - use_test_throws_matchers |
| 132 | + - use_to_and_as_if_applicable |
| 133 | + |
| 134 | +analyzer: |
| 135 | + exclude: |
| 136 | + - build/** |
| 137 | + - '**/**.freezed.dart' |
| 138 | + - 'lib/**.g.dart' |
| 139 | + - 'lib/**.graphql.dart' |
| 140 | + - 'lib/ui/djungo_custom_icons.dart' |
| 141 | + - '**/l10n/app_localizations*.dart' |
| 142 | + errors: |
| 143 | + invalid_annotation_target: ignore |
| 144 | + |
| 145 | +dart_code_metrics: |
| 146 | + anti-patterns: |
| 147 | + - long-method |
| 148 | + - long-parameter-list |
| 149 | + metrics: |
| 150 | + cyclomatic-complexity: 20 |
| 151 | + maximum-nesting-level: 5 |
| 152 | + number-of-parameters: 4 |
| 153 | + source-lines-of-code: 50 |
| 154 | + metrics-exclude: |
| 155 | + - test/** |
| 156 | + rules: |
| 157 | + - no-boolean-literal-compare |
| 158 | + - no-empty-block |
| 159 | + - prefer-trailing-comma |
| 160 | + - no-equal-then-else |
| 161 | + |
| 162 | +# Additional information about this file can be found at |
| 163 | +# https://dart.dev/guides/language/analysis-options |
0 commit comments