-
-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy path.rubocop.yml
111 lines (106 loc) · 2.24 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
---
inherit_from:
- https://relaxed.ruby.style/rubocop.yml
require:
- rubocop-rspec
AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
NewCops: enable
TargetRubyVersion: 2.6
Exclude:
- "vendor/**/*"
- "spec/fixtures/**/*"
- "bin/**/*"
- "script/**/*"
- "tmp/**/*"
Layout/HashAlignment:
EnforcedHashRocketStyle: table
EnforcedColonStyle: table
Lint/AmbiguousBlockAssociation:
Exclude:
- "spec/**/*" # `expect { }.to change { }` is fine
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
- feature
AllowedMethods:
- configure
- context
- define
- describe
- factory
- it
- namespace
- specify
- task
- shared_examples_for
- shared_context
- feature
- define_type
Layout/LineLength:
Enabled: true
Max: 120
Metrics/ClassLength:
Exclude:
- "spec/**/*_spec.rb"
Naming/RescuedExceptionsVariableName:
PreferredName: ex
Naming/FileName:
Enabled: false
Naming/MethodParameterName:
Enabled: false
Style/EmptyLiteral:
Enabled: false
Style/FormatStringToken:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: true
Style/HashSyntax:
Exclude:
- lib/tasks/**/*.rake
Style/NumericLiterals:
Enabled: false
Style/StringConcatenation:
Enabled: false
Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes
Style/SymbolArray:
MinSize: 4
# Rspec
RSpec/ContextWording:
Enabled: false
RSpec/DescribeClass:
Enabled: false
RSpec/DescribedClass:
Enabled: false
RSpec/ExampleLength:
Max: 10
RSpec/ExampleWording:
Enabled: false
RSpec/ExpectChange:
EnforcedStyle: block
RSpec/ImplicitExpect:
Enabled: false
RSpec/LeadingSubject:
Enabled: false
RSpec/MultipleExpectations:
Max: 4
RSpec/NestedGroups:
Max: 4
RSpec/NotToNot:
Enabled: false
RSpec/ExpectInHook:
Enabled: false
RSpec/LetSetup:
Enabled: false