forked from stripe/stripe-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
56 lines (41 loc) · 1.26 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
inherit_from: .rubocop_todo.yml
AllCops:
DisplayCopNames: true
TargetRubyVersion: 2.3
Layout/CaseIndentation:
EnforcedStyle: end
Layout/IndentFirstArrayElement:
EnforcedStyle: consistent
Layout/IndentFirstHashElement:
EnforcedStyle: consistent
# This can be re-enabled once we're 2.3+ only and can use the squiggly heredoc
# operator. Prior to that, Rubocop recommended bringing in a library like
# ActiveSupport to get heredoc indentation, which is just terrible.
Layout/IndentHeredoc:
Enabled: false
Metrics/ClassLength:
Exclude:
- "test/**/*.rb"
Metrics/LineLength:
Exclude:
- "lib/stripe/resources/**/*.rb"
- "test/**/*.rb"
Metrics/MethodLength:
# There's ~2 long methods in `StripeClient`. If we want to truncate those a
# little, we could move this to be closer to ~30 (but the default of 10 is
# probably too short).
Max: 50
Metrics/ModuleLength:
Enabled: false
Style/AccessModifierDeclarations:
EnforcedStyle: inline
Style/FrozenStringLiteralComment:
EnforcedStyle: always
Style/NumericPredicate:
Enabled: false
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma