-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.rubocop.yml
98 lines (76 loc) · 2.11 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
inherit_from: .rubocop_todo.yml
require:
- rubocop-rspec
AllCops:
TargetRubyVersion: 2.6
Exclude:
- 'bin/*'
# Don't care about frozen strings
Style/FrozenStringLiteralComment:
Enabled: false
# Don't care about code comments (yet)
Style/Documentation:
Enabled: false
Layout/LineLength:
Max: 120
Layout/HashAlignment:
EnforcedColonStyle: key
EnforcedHashRocketStyle: key
Layout/ParameterAlignment:
Enabled: false
Layout/FirstHashElementIndentation:
EnforcedStyle: consistent
# Only exclude the CLI app since we cannot split this up in the current form
Metrics/ClassLength:
Exclude:
- 'lib/vaulty/cli_app.rb'
Metrics/BlockLength:
Exclude:
- 'spec/**/*.rb'
Style/PercentLiteralDelimiters:
PreferredDelimiters:
default: ()
'%i': '()'
'%I': '()'
'%r': '{}'
'%w': '()'
'%W': '()'
# -----------------------------------------------------------------------------
# RSpec
# -----------------------------------------------------------------------------
# Conceptually right but practical with ActiveRecord models nearly impossible
RSpec/AnyInstance:
Enabled: false
# For API and feature specs this makes no sense
RSpec/DescribeClass:
Enabled: false
# For testing json response bodies we easily hit this limit
RSpec/ExampleLength:
Enabled: false
# Don't really have a preference and first seems odd
RSpec/LeadingSubject:
Enabled: false
# let! is very handy so allowed
RSpec/LetSetup:
Enabled: false
# Not really a preference and sometimes there is no way around it
RSpec/MessageSpies:
Enabled: false
# Sometimes its clear enough
RSpec/NamedSubject:
Enabled: false
# If we got more then 5 then probably we are testing to much in one block
RSpec/MultipleExpectations:
Max: 20
# Probably will disable this one, for some api specs this is needed
RSpec/NestedGroups:
Max: 6
# If your it is multiline then you cannot use short hand syntax, wonky
RSpec/ImplicitSubject:
Enabled: false
# For now disable, not sure if this matches up with Gems
RSpec/FilePath:
Enabled: false
# Shared contexts don't need to start with when, with or without
RSpec/ContextWording:
Enabled: true