|
1 | | -# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file |
2 | | -# for details. All rights reserved. Use of this source code is governed by a |
3 | | -# BSD-style license that can be found in the LICENSE file. |
| 1 | +# This file configures the analyzer, which statically analyzes Dart code to |
| 2 | +# check for errors, warnings, and lints. |
4 | 3 | # |
5 | | -# Google internally enforced rules. See README.md for more information, |
6 | | -# including a list of lints that are intentionally _not_ enforced. |
7 | | -# |
8 | | -# https://github.com/google/pedantic |
| 4 | +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled |
| 5 | +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be |
| 6 | +# invoked from the command line by running `flutter analyze`. |
| 7 | + |
| 8 | +# The following line activates a set of recommended lints for Flutter apps, |
| 9 | +# packages, and plugins designed to encourage good coding practices. |
| 10 | +include: package:flutter_lints/flutter.yaml |
9 | 11 |
|
10 | 12 | linter: |
| 13 | + # The lint rules applied to this project can be customized in the |
| 14 | + # section below to disable rules from the `package:flutter_lints/flutter.yaml` |
| 15 | + # included above or to enable additional rules. A list of all available lints |
| 16 | + # and their documentation is published at |
| 17 | + # https://dart-lang.github.io/linter/lints/index.html. |
| 18 | + # |
| 19 | + # Instead of disabling a lint rule for the entire project in the |
| 20 | + # section below, it can also be suppressed for a single line of code |
| 21 | + # or a specific dart file by using the `// ignore: name_of_lint` and |
| 22 | + # `// ignore_for_file: name_of_lint` syntax on the line or in the file |
| 23 | + # producing the lint. |
11 | 24 | rules: |
12 | | - - always_declare_return_types |
13 | | - - always_require_non_null_named_parameters |
14 | | - - annotate_overrides |
15 | | - - avoid_empty_else |
16 | | - - avoid_init_to_null |
17 | | - - avoid_null_checks_in_equality_operators |
18 | | - - avoid_relative_lib_imports |
19 | | - - avoid_return_types_on_setters |
20 | | - - avoid_shadowing_type_parameters |
21 | | - - avoid_types_as_parameter_names |
22 | | - - camel_case_extensions |
23 | | - - curly_braces_in_flow_control_structures |
24 | | - - empty_catches |
25 | | - - empty_constructor_bodies |
26 | | - - library_names |
27 | | - - library_prefixes |
28 | | - - no_duplicate_case_values |
29 | | - - null_closures |
30 | | - #- omit_local_variable_types |
31 | | - - prefer_adjacent_string_concatenation |
32 | | - - prefer_collection_literals |
33 | | - - prefer_conditional_assignment |
34 | | - - prefer_contains |
35 | | - - prefer_equal_for_default_values |
36 | | - - prefer_final_fields |
37 | | - - prefer_for_elements_to_map_fromIterable |
38 | | - - prefer_generic_function_type_aliases |
39 | | - - prefer_if_null_operators |
40 | | - - prefer_is_empty |
41 | | - - prefer_is_not_empty |
42 | | - - prefer_iterable_whereType |
43 | | - - prefer_single_quotes |
44 | | - - prefer_spread_collections |
45 | | - - recursive_getters |
46 | | - - slash_for_doc_comments |
47 | | - - type_init_formals |
48 | | - - unawaited_futures |
49 | | - - unnecessary_const |
50 | | - - unnecessary_new |
51 | | - - unnecessary_null_in_if_null_operators |
52 | | - - unnecessary_this |
53 | | - - unrelated_type_equality_checks |
54 | | - - use_function_type_syntax_for_parameters |
55 | | - - use_rethrow_when_possible |
56 | | - - valid_regexps |
| 25 | + # avoid_print: false # Uncomment to disable the `avoid_print` rule |
| 26 | + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule |
| 27 | +# Additional information about this file can be found at |
| 28 | +# https://dart.dev/guides/language/analysis-options |
0 commit comments