-
Notifications
You must be signed in to change notification settings - Fork 103
/
analysis_options.yaml
51 lines (49 loc) · 1.66 KB
/
analysis_options.yaml
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
# Specify analysis options for all of flutter/cocoon
#
# Until there are meta linter rules, each desired lint must be explicitly enabled.
# See: https://github.com/dart-lang/linter/issues/288
#
# For a list of lints, see: http://dart-lang.github.io/linter/lints/
# See the configuration guide for more
# https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer
#
# There are other similar analysis options files in the flutter repos,
# which should be kept in sync with this file:
#
# - analysis_options.yaml (this file)
# - packages/flutter/lib/analysis_options_user.yaml
# - https://github.com/flutter/packages/blob/main/analysis_options.yaml
# - https://github.com/flutter/engine/blob/main/analysis_options.yaml
#
# This file contains the analysis options used by Flutter tools, such as IntelliJ,
# Android Studio, and the `flutter analyze` command.
include: package:flutter_lints/flutter.yaml
analyzer:
language:
strict-casts: false
strict-raw-types: true
errors:
# treat missing required parameters as a warning (not a hint)
missing_required_param: warning
# allow having TODOs in the code
todo: ignore
exclude:
- ".dart_tool/**"
- "**/*.g.dart"
- "**/*.pb.dart"
- "**/*.pbjson.dart"
- "**/*.pbgrpc.dart"
- "**/*.pbserver.dart"
- "**/*.pbenum.dart"
- "lib/generated_plugin_registrant.dart"
- "test/**/mocks.mocks.dart"
linter:
rules:
use_super_parameters: true
prefer_final_fields: true
prefer_final_locals: true
prefer_single_quotes: true
require_trailing_commas: true
unawaited_futures: true
unnecessary_await_in_return: true
directives_ordering: true