-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalysis_options.yaml
More file actions
57 lines (52 loc) · 1.78 KB
/
analysis_options.yaml
File metadata and controls
57 lines (52 loc) · 1.78 KB
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
# 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.
analyzer:
linter:
rules:
# (Performance)
- prefer_const_constructors
- prefer_const_literals_to_create_immutables
- unnecessary_const
- unnecessary_new
- avoid_unnecessary_containers
- prefer_final_fields
- prefer_final_locals
- avoid_redundant_argument_values
# (Code Cleanliness)
- always_declare_return_types
- use_key_in_widget_constructors
- sort_child_properties_last
- sized_box_for_whitespace
- unnecessary_this
- prefer_expression_function_bodies
- prefer_collection_literals
- prefer_single_quotes
# (Safety & Error Prevention)
- annotate_overrides
- avoid_init_to_null
- avoid_empty_else
- avoid_catches_without_on_clauses
- empty_catches
- unnecessary_null_checks
- prefer_typing_uninitialized_variables
- null_closures
# - avoid_returning_null_for_future
# (Style & Structure)
# - require_trailing_commas
- prefer_final_parameters
- camel_case_extensions
- avoid_positional_boolean_parameters
- no_logic_in_create_state
# - avoid_returning_null
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options