-
Notifications
You must be signed in to change notification settings - Fork 2
/
.rubocop.yml
189 lines (137 loc) · 3.15 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# Examples of how to specifically exclude certain things
AllCops:
TargetRubyVersion: 2.7.5
Exclude:
- '**/*.yml'
- '**/*.sql'
- 'vendor/bundle/**/*'
- 'vendor/gems/**/*'
- 'node_modules/**/*'
- 'db/migrate/**/*.rb'
- '**/db/migrate/**/*.rb'
- '**/db/schema.rb'
- !ruby/regexp /old_and_unused\.rb$/
NewCops: enable
# Configure cops for styles that we do not adhere to or are not agreed upon
# Default settings and options can be viewed here: https://raw.githubusercontent.com/bbatsov/rubocop/master/config/default.yml
# Please add new configurations in alphabetical order
Layout/AccessModifierIndentation:
IndentationWidth: 2
Layout/EmptyLinesAroundClassBody:
Enabled: false
Layout/EndOfLine:
Enabled: false
Layout/ExtraSpacing:
Enabled: false
Layout/HashAlignment:
Enabled: false
Layout/LineLength:
Max: 150
Exclude:
- '**/*_test.rb'
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented_relative_to_receiver
Layout/SpaceBeforeFirstArg:
Enabled: false
Layout/SpaceInsideBlockBraces:
EnforcedStyleForEmptyBraces: space
Lint/AmbiguousRegexpLiteral:
Enabled: false
Lint/AmbiguousBlockAssociation:
Enabled: false
Lint/EmptyWhen:
Enabled: false
Metrics/AbcSize:
Max: 25
Metrics/BlockLength:
Exclude:
- 'Rakefile'
- '**/*.rake'
- '**/*_test.rb'
# Autobahn - RSpec relies on large blocks
- '**/*_spec.rb'
Metrics/ClassLength:
Max: 200
Exclude:
- '**/*_test.rb'
Metrics/CyclomaticComplexity:
Max: 10
Metrics/MethodLength:
Max: 20
Metrics/ModuleLength:
Max: 200
Metrics/ParameterLists:
Max: 10
Metrics/PerceivedComplexity:
Max: 10
Naming/HeredocDelimiterNaming:
Enabled: false
Naming/RescuedExceptionsVariableName:
Enabled: true
PreferredName: 'ex'
Naming/VariableNumber:
Enabled: false
Style/AndOr:
EnforcedStyle: conditionals
Style/ClassAndModuleChildren:
Enabled: true
# Mapping of methods to prefer, alternate => preferred
Style/CollectionMethods:
Enabled: true
PreferredMethods:
collect: 'map'
collect!: 'map!'
inject: 'reduce'
detect: 'find'
find_all: 'select'
length: 'size'
Style/CommentedKeyword:
Enabled: false
Style/Documentation:
Enabled: false
Style/DoubleNegation:
Enabled: false
Style/EachWithObject:
Enabled: false
Style/EmptyMethod:
Enabled: false
Style/FormatStringToken:
EnforcedStyle: template
Style/GuardClause:
Enabled: false
Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys
Style/IfUnlessModifier:
Enabled: false
Style/NegatedIf:
Enabled: false
Style/Lambda:
EnforcedStyle: literal
Style/Next:
Enabled: false
Style/NumericLiterals:
MinDigits: 9
Style/NumericPredicate:
Enabled: false
Style/ParallelAssignment:
Enabled: false
Style/PreferredHashMethods:
Enabled: false
Style/RegexpLiteral:
Enabled: false
Style/RescueStandardError:
Enabled: false
Style/SignalException:
Enabled: false
Style/StringLiterals:
Enabled: false
Style/SymbolArray:
Enabled: false
Style/TrailingCommaInArrayLiteral:
Enabled: false
Style/TrailingCommaInHashLiteral:
Enabled: false
Style/TrailingUnderscoreVariable:
Enabled: false
Style/WordArray:
EnforcedStyle: brackets