|
1 |
| -analyzer: |
2 |
| - |
3 |
| -# ALL lint rules are included and the ones not in use are commented |
4 |
| -# out with a reason. An up to date list of all options is here |
5 |
| -# http://dart-lang.github.io/linter/lints/options/options.html |
6 |
| -# Descriptions of each rule is here http://dart-lang.github.io/linter/lints/ |
7 |
| -# |
8 |
| -# To ignore a lint rule on a case by case basic in code just add a comment |
9 |
| -# above it like so: // ignore: <linter rule> |
10 |
| -# example: // ignore: invalid_assignment, const_initialized_with_non_constant_value |
11 |
| -# |
12 |
| -# More info about config lint config options is here |
13 |
| -# https://www.dartlang.org/guides/language/analysis-options#excluding-lines-within-a-file |
14 |
| -linter: |
15 |
| - rules: |
16 |
| - # Style: Declare method return types. |
17 |
| - # override with // ignore: always_declare_return_types |
18 |
| - - always_declare_return_types |
19 |
| - |
20 |
| - # Style: Specify type annotations. |
21 |
| - - always_specify_types # really annoying for local vars |
22 |
| - |
23 |
| - # Style: Annotate overridden members |
24 |
| - - annotate_overrides |
25 |
| - |
26 |
| - # Style: Avoid using as. |
27 |
| - - avoid_as |
28 |
| - |
29 |
| - # Error: Avoid empty else statements. |
30 |
| - - avoid_empty_else |
31 |
| - |
32 |
| - # Style: Don't explicitly initialize variables to null |
33 |
| - - avoid_init_to_null |
34 |
| - |
35 |
| - # Style: Avoid return types on setters. |
36 |
| - - avoid_return_types_on_setters |
37 |
| - |
38 |
| - # Style: Await only futures. |
39 |
| - - await_only_futures |
40 |
| - |
41 |
| - # Style: Name types using UpperCamelCase. |
42 |
| - - camel_case_types |
43 |
| - |
44 |
| - # Error: Cancel instances of dart.async.StreamSubscription. |
45 |
| - - cancel_subscriptions |
46 |
| - |
47 |
| - # Error: Close instances of dart.core.Sink. |
48 |
| - - close_sinks |
49 |
| - |
50 |
| - # Error: Only reference in scope identifiers in doc comments. |
51 |
| - - comment_references |
52 |
| - |
53 |
| - # Style: Prefer using lowerCamelCase for constant names. |
54 |
| - - constant_identifier_names |
55 |
| - |
56 |
| - # Error: Avoid control flow in finally block. |
57 |
| - - control_flow_in_finally |
58 |
| - |
59 |
| - # Style: Avoid empty catch blocks. |
60 |
| - - empty_catches |
61 |
| - |
62 |
| - # Style: Use ; instead of {} for empty constructor bodies. |
63 |
| - - empty_constructor_bodies |
64 |
| - |
65 |
| - # Error: Avoid empty statements. |
66 |
| - - empty_statements |
67 |
| - |
68 |
| - # Error: Always override hashCode if overriding == |
69 |
| - - hash_and_equals |
70 |
| - |
71 |
| - # Style: Don't import implementation files from another package. |
72 |
| - - implementation_imports |
73 |
| - |
74 |
| - # Error: Conditions should not unconditionally evaluate to "TRUE" or to "FALSE" |
75 |
| - - invariant_booleans |
76 |
| - |
77 |
| - # Error: Invocation of Iterable.contains with references of unrelated types. |
78 |
| - - iterable_contains_unrelated_type |
79 |
| - |
80 |
| - # Style: Name libraries and source files using lowercase_with_underscores. |
81 |
| - - library_names |
82 |
| - |
83 |
| - # Style: Use lowercase_with_underscores when specifying a library prefix. |
84 |
| - - library_prefixes |
85 |
| - |
86 |
| - # Error: Invocation of List.remove with references of unrelated types. |
87 |
| - - list_remove_unrelated_type |
88 |
| - |
89 |
| - # Error: Conditions should not unconditionally evaluate to "TRUE" or to "FALSE" |
90 |
| - - literal_only_boolean_expressions |
91 |
| - |
92 |
| - # Style: Name non-constant identifiers using lowerCamelCase. |
93 |
| - - non_constant_identifier_names # UiFactories will lint |
94 |
| - |
95 |
| - # Style: Avoid defining a one-member abstract class when a simple function will do. |
96 |
| - - one_member_abstracts |
97 |
| - |
98 |
| - # Style: Only throw instances of classes extending either Exception or Error |
99 |
| - - only_throw_errors |
100 |
| - |
101 |
| - # Style: Do not override fields. |
102 |
| - - overridden_fields |
103 |
| - |
104 |
| - # Style: Provide doc comments for all public APIs |
105 |
| - - package_api_docs |
106 |
| - |
107 |
| - # Pub: Use lowercase_with_underscores for package names. |
108 |
| - - package_names |
109 |
| - |
110 |
| - # Style: Prefix library names with the package name and a dot-separated path. |
111 |
| - - package_prefixed_library_names |
112 |
| - |
113 |
| - # Style: Don't reassign references to parameters of functions or methods. |
114 |
| - - parameter_assignments |
115 |
| - |
116 |
| - # Style: Private field could be final. |
117 |
| - - prefer_final_fields |
118 |
| - |
119 |
| - # Style: Prefer final for variable declaration if reference is not reassigned. |
120 |
| - # - prefer_final_locals # Noisy, people use var a lot |
121 |
| - |
122 |
| - # Style: Use isNotEmpty for Iterables and Maps. |
123 |
| - - prefer_is_not_empty |
124 |
| - |
125 |
| - # Style: Document all public members |
126 |
| - - public_member_api_docs |
127 |
| - |
128 |
| - # Style: Prefer to use /// for doc comments |
129 |
| - - slash_for_doc_comments |
130 |
| - |
131 |
| - # Style: Sort constructor declarations before method declarations. |
132 |
| - - sort_constructors_first |
133 |
| - |
134 |
| - # Style: Sort unnamed constructor declarations first |
135 |
| - - sort_unnamed_constructors_first |
136 |
| - |
137 |
| - # Error: Test type arguments in operator ==(Object other). |
138 |
| - - test_types_in_equals |
139 |
| - |
140 |
| - # Error: Avoid throw in finally block. |
141 |
| - - throw_in_finally |
142 |
| - |
143 |
| - # Style: Type annotate public APIs. |
144 |
| - - type_annotate_public_apis # render can return either ReactElement or false |
145 |
| - |
146 |
| - # Style: Don't type annotate initializing formals. |
147 |
| - - type_init_formals |
148 |
| - |
149 |
| - # Style: Await for future expression statements inside async function bodies. |
150 |
| - - unawaited_futures |
151 |
| - |
152 |
| - # Style: Avoid using braces in interpolation when not needed. |
153 |
| - # - unnecessary_brace_in_string_interp # preference |
154 |
| - |
155 |
| - # Style: Avoid wrapping fields in getters and setters just to be "safe". |
156 |
| - - unnecessary_getters_setters |
157 |
| - |
158 |
| - # Error: Equality operator (==) invocation with references of unrelated types. |
159 |
| - - unrelated_type_equality_checks |
160 |
| - |
161 |
| - # Error: Use valid regular expression syntax. |
162 |
| - - valid_regexps |
| 1 | +include: package:pedantic/analysis_options.yaml |
0 commit comments