Skip to content

Commit 8a488f4

Browse files
authored
Get more pub points (#138)
* Fix missing_return. * Remove redundant logger. * Remove unnecessary new. * more. * more. * more. * more. * more. * more. * more * more. * update. * update. * update. * update.
1 parent 7c30ad4 commit 8a488f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+4850
-4992
lines changed

analysis_options.yaml

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,46 @@
11
include: package:pedantic/analysis_options.yaml
22

3+
linter:
4+
rules:
5+
- always_declare_return_types
6+
- avoid_empty_else
7+
- await_only_futures
8+
- avoid_returning_null_for_void
9+
- cancel_subscriptions
10+
- directives_ordering
11+
- flutter_style_todos
12+
- sort_constructors_first
13+
- sort_unnamed_constructors_first
14+
- sort_pub_dependencies
15+
- type_init_formals
16+
- unnecessary_brace_in_string_interps
17+
- unnecessary_const
18+
- unnecessary_new
19+
- unnecessary_getters_setters
20+
- unnecessary_null_aware_assignments
21+
- unnecessary_null_in_if_null_operators
22+
- unnecessary_overrides
23+
- unnecessary_parenthesis
24+
- unnecessary_statements
25+
- unnecessary_string_interpolations
26+
- unnecessary_this
27+
- unrelated_type_equality_checks
28+
- use_rethrow_when_possible
29+
- valid_regexps
30+
- void_checks
31+
# - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219
32+
- always_require_non_null_named_parameters
33+
- always_specify_types
34+
- annotate_overrides
35+
- prefer_single_quotes
36+
- prefer_generic_function_type_aliases
37+
- prefer_final_fields
38+
339
analyzer:
440
errors:
5-
unused_local_variable: ignore
6-
unnecessary_new: ignore
41+
always_put_control_body_on_new_line: ignore
42+
argument_type_not_assignable: ignore
43+
omit_local_variable_types: ignore
744
slash_for_doc_comments: ignore
845
library_prefixes: ignore
946
unused_field: ignore
@@ -14,14 +51,14 @@ analyzer:
1451
curly_braces_in_flow_control_structures: ignore
1552
unnecessary_null_in_if_null_operators: ignore
1653
prefer_contains: ignore
17-
missing_return: ignore
18-
override_on_non_overriding_getter: ignore
19-
override_on_non_overriding_field: ignore
20-
override_on_non_overriding_method: ignore
2154
avoid_types_as_parameter_names: ignore
2255
empty_catches: ignore
2356
unawaited_futures: ignore
2457
use_rethrow_when_possible: ignore
2558
unused_import: ignore
2659
must_be_immutable: ignore
60+
todo: ignore
2761

62+
exclude:
63+
- lib/src/grammar_parser.dart
64+
- tool/*

example/lib/main.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ void main() {
1919
typedef PageContentBuilder = Widget Function(
2020
[SIPUAHelper helper, Object arguments]);
2121

22+
// ignore: must_be_immutable
2223
class MyApp extends StatelessWidget {
2324
final SIPUAHelper _helper = SIPUAHelper();
2425
Map<String, PageContentBuilder> routes = {
@@ -45,6 +46,7 @@ class MyApp extends StatelessWidget {
4546
return route;
4647
}
4748
}
49+
return null;
4850
}
4951

5052
@override

0 commit comments

Comments
 (0)