-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
153 lines (121 loc) · 3.99 KB
/
.rubocop.yml
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
require:
- rubocop-rspec
- rubocop-rails
- rubocop-performance
- rubocop-factory_bot
Layout/FirstHashElementIndentation:
Description: Enforces consistent indentation for the first key in a hash literal
EnforcedStyle: consistent
Enabled: true
Layout/MultilineMethodCallIndentation:
Description: Indent on multiline method call
EnforcedStyle: indented_relative_to_receiver
Enabled: true
Lint/AmbiguousBlockAssociation:
Description: Allows change method as ambiguous block association
AllowedMethods: [change]
Enabled: true
Metrics/AbcSize:
Description: Setting Max AbcSize to 30, default of 17 is arbitrary and too low
Max: 30
Enabled: false
Metrics/BlockLength:
Description: Allow block to have any length
Enabled: false
Metrics/ClassLength:
Description: Allow classes of any length
Enabled: false
Metrics/CyclomaticComplexity:
Description: Disabaling the cop since it can be arbitrary
Enabled: false
Metrics/MethodLength:
Description: Allow method to have any length
Enabled: false
Metrics/PerceivedComplexity:
Description: Disabaling the cop since it can be arbitrary
Enabled: false
Naming/MemoizedInstanceVariableName:
Description: Allows instance variable name to be different than method name
Enabled: false
Naming/VariableNumber:
Description: Makes sure that all numbered variables use snake case for their numbering.
EnforcedStyle: snake_case
CheckSymbols: false
Enabled: true
# To do: Resolve the offense Style/Documentation
Style/Documentation:
Description: Disabaling documentation
Enabled: false
Style/HashSyntax:
Description: Force use of the 1.9 syntax for hash with no mixed keys
EnforcedStyle: ruby19_no_mixed_keys
Enabled: true
Style/RegexpLiteral:
Description: Allow forward slashes within regular expressions
AllowInnerSlashes: true
Enabled: true
Style/SymbolArray:
Description: Force arrays of symbols to use bracket notation
EnforcedStyle: brackets
Enabled: true
Style/TernaryParentheses:
Description: Require parentheses in ternary conditions when they are complex
EnforcedStyle: require_parentheses_when_complex
Enabled: true
Style/WordArray:
Description: Force arrays of words to use bracket notation instead of %w
EnforcedStyle: brackets
Enabled: true
Rails/Blank:
Description: Allows usage of nil, empty and present
NilOrEmpty: false
NotPresent: false
UnlessPresent: false
Enabled: true
Rails/FilePath:
Description: Enable argument type for file path joining
EnforcedStyle: arguments
Enabled: true
Rails/LexicallyScopedActionFilter:
Description: Disable the cop as it has conflict with Lint/UselessMethodDefinition
Enabled: false
Rails/NotNullColumn:
Description: Disable not null column to avoid error due to rubocop
Enabled: false
Rails/SkipsModelValidations:
Description: Allows update and update_columns for faster execution
AllowedMethods: ['update_all']
Enabled: true
RSpec/AnyInstance:
Description: Allow stubbing instance of a class
Enabled: false
RSpec/ContextWording:
Description: Does not restrict starting context wording using when, with or without
Enabled: false
RSpec/ExampleLength:
Description: Allow test example to have any length
Enabled: false
RSpec/MultipleExpectations:
Description: Allow tests to contain multiple expectations
Enabled: false
RSpec/MultipleMemoizedHelpers:
Description: Does not limit the number of let to an arbitrary number
Enabled: false
RSpec/NestedGroups:
Description: Limites the allowed nested example groups
Max: 4
Style/ClassAndModuleChildren:
Description: Allow compact and nested style of children definitions at classes and modules
Enabled: false
Style/FormatStringToken:
Description: Enforces template style for formatting strings
EnforcedStyle: template
Enabled: true
Style/NumericPredicate:
Description: Allows the use of comparison operator
EnforcedStyle: comparison
Enabled: true
Style/SymbolProc:
Description: Allows block for method with arguments
AllowMethodsWithArguments: true
Enabled: true