-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanalysis_options.yaml
95 lines (87 loc) · 4.01 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# 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 `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:very_good_analysis/analysis_options.4.0.0.yaml
analyzer:
exclude:
- lib/**/*.gr.dart
- lib/**/*.config.dart
- lib/**/*.g.dart
- lib/**/*.freezed.dart
- test/**/*.mocks.dart
# language:
# strict-casts: true
# strict-raw-types: true
errors:
# Allow having TODOs in the code.
todo: ignore
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
avoid_equals_and_hash_code_on_mutable_classes: false
always_use_package_imports: false
sort_constructors_first: false
use_late_for_private_fields_and_variables: false
prefer_const_declarations: false
unnecessary_overrides: false
avoid_setters_without_getters: false
use_build_context_synchronously: false
avoid_web_libraries_in_flutter: false
use_setters_to_change_properties: false
avoid_dynamic_calls: false
one_member_abstracts: false
library_private_types_in_public_api: false
prefer_relative_imports: true
prefer_if_elements_to_conditional_expressions: false
cascade_invocations: false
require_trailing_commas: false
depend_on_referenced_packages: false
# DO avoid print calls in production code.
#
# https://dart-lang.github.io/linter/lints/avoid_print.html
#
# My default is to have this rule enabled.
#
# Examples may want to print to the console, you might want to do so during development too. I keep the rule here
# to handily disable/enable as and when needed. This lint rule is a good way to find prints statements that you
# may have used during development in code that should not have them in production, so at least before
# committing the code in such projects, make sure to keep this rule enabled by commenting it out here.
#
# RELEASE: ENABLE : By commenting it out. (My default).
# DEVELOPMENT: DISABLE : With false value, if the warnings bother you during dev or making a console app.
avoid_print: false
# DO document all public members.
#
# https://dart-lang.github.io/linter/lints/public_member_api_docs.html
#
# All non-overriding public members should be documented with /// doc-style comments.
# Not necessary for an app or the examples in a pub.dev package. I enabled this for
# public packages, I keep the rule here so I can enable by commenting out this rule here.
#
# PACKAGE: ENABLE : By commenting it out.
# APPLICATION: DISABLE : With false value. (My default, assume we are making an app most of the time.)
public_member_api_docs: false
# DO sort pub dependencies in pubspec.yaml.
#
# https://dart-lang.github.io/linter/lints/sort_pub_dependencies.html
#
# Personal preference, I prefer sorting it manually based on package functionality.
sort_pub_dependencies: false
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options