-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
155 lines (144 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
inherit_from:
- https://relaxed.ruby.style/rubocop.yml
require:
- rubocop-rspec
- rubocop-performance
AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
TargetRubyVersion: 2.6
Exclude:
- "vendor/**/*"
- "spec/fixtures/**/*"
- "bin/**/*"
Layout:
Severity: error
Lint:
Severity: error
Layout/HashAlignment:
EnforcedHashRocketStyle: table
EnforcedColonStyle: table
Layout/LineLength:
Enabled: true
Max: 140
Lint/AmbiguousBlockAssociation:
Exclude:
- "spec/**/*" # `expect { }.to change { }` is fine
Lint/BooleanSymbol:
Exclude:
- "spec/**/*" # Symbols like :true get used in these test quite a bit
Lint/ShadowingOuterLocalVariable:
# Shadowing outer local variables with block parameters is often useful to
# not reinvent a new name for the same thing, it highlights the relation
# between the outer variable and the parameter. The cases where it's actually
# confusing are rare, and usually bad for other reasons already, for example
# because the method is too long.
Enabled: false
Metrics/BlockLength:
Exclude:
- Gemfile
- Guardfile
- shared_context
ExcludedMethods:
- configure
- context
- define
- describe
- it
- namespace
- specify
- task
- shared_examples_for
- shared_context
- feature
Metrics/ClassLength:
Exclude:
- "spec/**/*_spec.rb"
Naming/RescuedExceptionsVariableName:
PreferredName: ex
Naming/FileName:
Enabled: false
Naming/MethodName:
Enabled: false # welcome to the visitor pattern
Naming/MethodParameterName:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Style/EmptyLiteral:
Enabled: false
Style/FormatStringToken:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: true
Style/HashEachMethods:
Enabled: true
Style/HashSyntax:
Exclude:
- Rakefile
- "**/*.rake"
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true
Style/MethodCallWithoutArgsParentheses:
Enabled: true
Style/NumericLiterals:
Enabled: false
Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes
Style/SymbolArray:
MinSize: 4
# 0.81
Lint/RaiseException:
Enabled: true
Lint/StructNewOverride:
Enabled: false
# 0.82
Layout/SpaceAroundMethodCallOperator:
Enabled: true
Style/ExponentialNotation:
Enabled: true
# 0.83
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true
Style/SlicingWithRange:
Enabled: true
# 0.84
Lint/DeprecatedOpenSSLConstant:
Enabled: true
# Rspec
Capybara/FeatureMethods:
Enabled: false
RSpec/ContextWording:
Enabled: false
RSpec/DescribeClass:
Enabled: false
RSpec/DescribedClass:
Enabled: false
RSpec/ExampleLength:
Max: 20
RSpec/ExampleWording:
Enabled: false
RSpec/ExpectChange:
EnforcedStyle: block
RSpec/FilePath:
Enabled: false
RSpec/ImplicitExpect:
Enabled: false
RSpec/LeadingSubject:
Enabled: false
RSpec/MessageSpies:
Enabled: false
RSpec/MultipleExpectations:
Max: 4
RSpec/NestedGroups:
Max: 4
RSpec/NotToNot:
Enabled: false
RSpec/ExpectInHook:
Enabled: false
RSpec/LetSetup:
Enabled: false
RSpec/NamedSubject:
Enabled: false