forked from PalisadoesFoundation/talawa
-
Notifications
You must be signed in to change notification settings - Fork 1
/
analysis_options.yaml
88 lines (63 loc) · 2.14 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
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
file_names: true
leading_newlines_in_multiline_strings: false
# Forces explicit return type declaration
always_declare_return_types: true
type_annotate_public_apis: false
# 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
depend_on_referenced_packages: true
# 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: true
#############################################
################### REMOVE ##################
#############################################
unreachable_from_main: false
implicit_call_tearoffs: false
dangling_library_doc_comments: false