This repository has been archived by the owner on Dec 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
214 lines (161 loc) · 3.97 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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
require:
- rubocop-performance
- rubocop-rspec
inherit_from: .rubocop_todo.yml
AllCops:
DisplayCopNames: true
TargetRubyVersion: 2.5
Exclude:
- 'bin/bundle'
- 'bin/console'
- 'bin/rspec'
- 'bin/rubocop'
- 'bin/yard'
- '.bundle/**/*'
- 'vendor/bundle/**/*'
- 'data/**/*'
- '*.gemspec'
- 'spec/fixtures/**/*'
Naming/FileName:
ExpectMatchingDefinition: true
Exclude:
- 'bin/**/*'
- 'lib/moku/scm/**/*'
- 'lib/core_extensions/**/*'
- 'spec/**/*'
- 'lib/*/version.rb'
- 'bin/console'
- 'deploy/**/*'
- 'lib/*/components/*'
- 'lib/*/components.rb'
Style/Documentation:
Exclude:
- 'spec/**/*'
- 'lib/*/components/*'
- 'lib/*/components.rb'
Style/RedundantBegin:
Enabled: false
Style/SpecialGlobalVars:
Enabled: false
# We disable this cop because we want to use Pathname#/
# and this cop is not configurable at all.
Layout/SpaceAroundOperators:
Enabled: false
Security/YAMLLoad:
Exclude:
- 'lib/moku/file_instance_repo.rb'
- 'spec/**/*'
Style/Alias:
EnforcedStyle: prefer_alias_method
Metrics/LineLength:
Max: 100
AllowHeredoc: true
AllowURI: true
URISchemes:
- http
- https
Metrics/BlockLength:
Exclude:
- 'spec/support/**/*.rb'
- 'spec/**/*_spec.rb'
Layout/ElseAlignment:
Enabled: false
Layout/FirstParameterIndentation:
EnforcedStyle: consistent
Layout/AlignParameters:
EnforcedStyle: with_fixed_indentation
Layout/CaseIndentation:
EnforcedStyle: end
Layout/ClosingParenthesisIndentation:
Enabled: false
Style/ClassAndModuleChildren:
EnforcedStyle: nested
Metrics/ModuleLength:
Exclude:
- 'spec/**/*_spec.rb'
Style/CommentAnnotation:
Enabled: false
# Does not work for multi-line copyright notices.
Style/Copyright:
Enabled: false
Layout/EmptyLineBetweenDefs:
AllowAdjacentOneLineDefs: true
# These two cops do not differentiate between the scope the file is describing
# and any namespaces it is nested under. If this is not acceptable,
# no_empty_lines produces the least offensive results.
Layout/EmptyLinesAroundClassBody:
Enabled: false
Layout/EmptyLinesAroundModuleBody:
Enabled: false
# Produces poor results.
Style/GuardClause:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Layout/IndentArray:
EnforcedStyle: consistent
Layout/IndentHash:
EnforcedStyle: consistent
Layout/AlignHash:
EnforcedColonStyle: table
EnforcedHashRocketStyle: table
EnforcedLastArgumentHashStyle: always_ignore
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
Layout/MultilineOperationIndentation:
EnforcedStyle: indented
# Produces poor results.
Style/Next:
Enabled: false
Style/RedundantReturn:
AllowMultipleReturnValues: true
Style/RegexpLiteral:
AllowInnerSlashes: true
Style/Semicolon:
AllowAsExpressionSeparator: true
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
Layout/SpaceInsideBlockBraces:
SpaceBeforeBlockParameters: false
Style/SymbolArray:
EnforcedStyle: brackets
Layout/BlockAlignment:
EnforcedStyleAlignWith: start_of_block
Layout/EndAlignment:
EnforcedStyleAlignWith: start_of_line
Layout/DefEndAlignment:
EnforcedStyleAlignWith: def
Performance/RedundantMerge:
Enabled: false
Style/WordArray:
EnforcedStyle: brackets
# This cop just adds extra work when you want to write an integration test,
# or test something like a jbuilder view.
RSpec/DescribeClass:
Enabled: false
# Using let! is fine, and can be easier to manage than a before block.
RSpec/LetSetup:
Enabled: false
RSpec/BeEql:
Enabled: false
RSpec/ExampleWithoutDescription:
EnforcedStyle: single_line_only
RSpec/HookArgument:
EnforcedStyle: each
RSpec/ImplicitSubject:
EnforcedStyle: disallow
RSpec/LeadingSubject:
Enabled: false
RSpec/MultipleExpectations:
Enabled: true
Max: 3
RSpec/NestedGroups:
Max: 3
RSpec/VerifiedDoubles:
Enabled: false
RSpec/ExampleLength:
Max: 10
RSpec/MessageSpies:
EnforcedStyle: receive