This repository was archived by the owner on Aug 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathanalysis_options.yaml
More file actions
52 lines (47 loc) · 1.76 KB
/
analysis_options.yaml
File metadata and controls
52 lines (47 loc) · 1.76 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
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `dart analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
analyzer:
language:
strict-casts: true
strict-inference: true
# Explanation: https://dash-overflow.net/articles/getting_started/
errors:
# treat missing required parameters as an error (not a hint)
missing_required_param: error
# treat missing returns as an error (not a hint)
missing_return: error
invalid_annotation_target: ignore
exclude:
- lib/**/*.g.dart
- lib/*.g.dart
- lib/**/*.gen.dart
- lib/**/*.freezed.dart
- test/**/*.mocks.dart
- test/coverage_helper_test.dart
- integration_test/**/*.mocks.dart
- integration_test/**/*.g.dart
- integration_test/**/*.freezed.dart
linter:
rules:
avoid_dynamic_calls: true
prefer_const_constructors: false # This should be enabled for most of the time, if it's not too much irritating
prefer_const_declarations: false
use_key_in_widget_constructors: false
sort_child_properties_last: true
prefer_final_in_for_each: true
prefer_final_locals: true
avoid_void_async: true
unnecessary_parenthesis: true
always_declare_return_types: true
unawaited_futures: true
only_throw_errors: true
missing_whitespace_between_adjacent_strings: true
# To consider:
avoid_function_literals_in_foreach_calls: false