/
.rubocop.yml
159 lines (122 loc) · 3.06 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
AllCops:
UseCache: true
DisplayCopNames: true
DisplayStyleGuide: true
ExtraDetails: false
TargetRubyVersion: 2.5.3
Layout/ClassStructure:
Enabled: true
Categories:
module_inclusion:
- extend
- include
- prepend
attributes:
- attr_accessor
- attr_reader
- attr_writer
ExpectedOrder:
- constants
- module_inclusion
- attributes
- public_class_methods
- initializer
- public_methods
- predicates
- protected_methods
- private_methods
Layout/DotPosition:
EnforcedStyle: trailing
Layout/EmptyLineAfterGuardClause:
Enabled: true
Layout/EndOfLine:
EnforcedStyle: lf
Layout/IndentFirstArgument:
EnforcedStyle: consistent_relative_to_receiver
Layout/IndentFirstArrayElement:
EnforcedStyle: consistent
Layout/IndentFirstHashElement:
EnforcedStyle: consistent
Layout/MultilineAssignmentLayout:
Enabled: true
Layout/MultilineMethodCallBraceLayout:
EnforcedStyle: same_line
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented_relative_to_receiver
Layout/MultilineMethodDefinitionBraceLayout:
EnforcedStyle: same_line
Layout/MultilineOperationIndentation:
Enabled: false # Waiting for e.g. `indented_relative_to_receiver`.
Lint/AmbiguousOperator:
Enabled: false # Conflicts with other rules.
Lint/AmbiguousRegexpLiteral:
Enabled: false # Conflicts with other rules.
Lint/Void:
CheckForMethodsWithNoSideEffects: true
Metrics/BlockLength:
ExcludedMethods:
- new
- describe # Tests
- context # Tests
- ips # Benchmarking
Metrics/ClassLength:
Exclude:
- "test/**/*"
- "lib/object_inspector/formatters/templating_formatter.rb"
Metrics/LineLength:
Max: 80
Exclude:
- "test/**/*"
- "object_inspector.gemspec"
Naming/UncommunicativeMethodParamName:
AllowedNames:
- a
- b
Style/Alias:
EnforcedStyle: prefer_alias_method
Style/BlockDelimiters:
Enabled: false # Reconsider later.
Style/ClassAndModuleChildren:
AutoCorrect: true
Exclude:
- "test/**/*"
Style/CollectionMethods:
Enabled: true
PreferredMethods:
collect: map
collect!: map!
find_all: select
detect: detect
inject: inject
Style/EmptyElse:
# It"s helpful to show intent by including a comment in an else block.
Enabled: false
Style/EmptyMethod:
EnforcedStyle: expanded
Style/ExpandPathArguments:
Exclude:
- "object_inspector.gemspec"
Style/FormatString:
Enabled: false # % notation with an Array just reads better sometimes.
Style/Lambda:
EnforcedStyle: literal
Style/LambdaCall:
Enabled: false # Allow ServiceObject.(*). Only use on classes, not instances.
Style/NumericPredicate:
Enabled: false # Trying to be welcoming to earlier versions of Ruby.
# AutoCorrect: true
Style/RegexpLiteral:
EnforcedStyle: mixed
Style/RescueStandardError:
EnforcedStyle: implicit
Style/ReturnNil:
Enabled: true
Style/StringMethods:
Enabled: true
Style/SingleLineMethods:
Exclude:
- "test/**/*_test.rb"
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes