forked from flutter/cocoon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
analysis_options.yaml
48 lines (46 loc) · 1.58 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
# 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/plugins/blob/master/analysis_options.yaml
# - https://github.com/flutter/engine/blob/master/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
# treat missing returns as a warning (not a hint)
missing_return: warning
# allow having TODOs in the code
todo: ignore
implicit_dynamic_parameter: info
exclude:
- ".dart_tool/**"
- "**/*.g.dart"
- "**/*.pb.dart"
- "**/*.pbjson.dart"
- "**/*.pbenum.dart"
- "test/**/mocks.mocks.dart"
linter:
rules:
use_super_parameters: true
prefer_final_fields: true
prefer_final_locals: true
require_trailing_commas: true
unawaited_futures: true