forked from PalisadoesFoundation/talawa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
analysis_options.yaml
100 lines (72 loc) · 2.86 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
96
97
98
99
100
include: package:lint/analysis_options.yaml
analyzer:
exclude:
- lib/generated_plugin_registrant.dart
- test/helpers/test_helpers.mocks.dart
plugins:
custom_lint
custom_lint:
rules:
- talawa_lint
exclude:
- test/
linter:
rules:
# Make constructors the first thing in every class
sort_constructors_first: true
# Use parameter order as in json response
always_put_required_named_parameters_first: false
# Util classes
avoid_classes_with_only_static_members: false
avoid_redundant_argument_values: false
# Unnecessary use of this in constructors should not be done
unnecessary_this: false
# source files name using lowercase_with_underscores
# lowercase_with_underscores: true
leading_newlines_in_multiline_strings: false
always_declare_return_types: false
type_annotate_public_apis: false
#always_use_package_imports to make a quick navigation to particular files
always_use_package_imports: true
directives_ordering: true
# In case of production should be set to true
avoid_print: false
avoid_unnecessary_containers: false
prefer_if_elements_to_conditional_expressions: false
avoid_function_literals_in_foreach_calls: false
join_return_with_assignment: false
prefer_const_literals_to_create_immutables: false
####################################################
#### Added to make things work for now. Must be ####
############# removed in future PRs ################
####################################################
# Advises to explicitly install any plugin which you are using
# in your codebase. At many places in our codebase we have used
# things of a plugin which is not in our pubspec.yaml. Say we have
# installed plugin A, which in turn internally installs plugin B, as
# A depends on B, and then we are using functionalities of B, even
# though we never installed them explicitly; they just got installed.
#
# To fix: Uncomment below lint and check for warnings it creates. Then
# install the dependencies one by one.
depend_on_referenced_packages: false
# This new lint rule advises to use methods on dynamic objects
# only after properly type casting. It's quite good and will avoid
# null errors.
# For now, it affects the whole code base; wherever we have done
# something like
#
# ```
# var obj = json_data['obj'];
# obj.fun_call(param);
# ```
#
# To fix: Turn on this lint and type cast the object of your file as
#
# ```
# MyObj obj = json_data['obj'] as MyObj;
# ```
avoid_dynamic_calls: false
# deprecated_member_use is turned off for file - test/helpers/test_helpers.dart
# to suppress returnNullOnMissingStub deprecation.
# To fix: Remove the lint suppress directive and update to latest API