This repository has been archived by the owner on Dec 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
/
.rubocop.yml
84 lines (72 loc) · 1.99 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
require: rubocop-performance
AllCops:
Exclude:
# These are autogenerated binstubs.
- 'bin/*'
# Keep rubocop from scanning installed gems.
- 'vendor/**/*'
TargetRubyVersion: 2.4
# Line length is something that isn't dogmatic. 80 chars is a good recommendation.
Layout/LineLength:
Enabled: false
# This requires leading comments which can tend to be redundant.
Style/Documentation:
Enabled: false
# I prefer my underscore convention.
Naming/MemoizedInstanceVariableName:
Enabled: false
Metrics/BlockLength:
Exclude:
# Tests involve long blocks.
- 'spec/**/*'
Metrics/ModuleLength:
Exclude:
# Tests involve piles of code.
- 'spec/**/*'
# When we use $stderr.puts, we don't see that as verbose.
Style/StderrPuts:
Enabled: false
# Extra cops:
# Encourages block syntax for things like File.open
Style/AutoResourceCleanup:
Enabled: true
# Standardize multi-line params.
Layout/FirstArrayElementLineBreak:
Enabled: true
Layout/FirstHashElementLineBreak:
Enabled: true
Layout/FirstMethodArgumentLineBreak:
Enabled: true
Layout/FirstMethodParameterLineBreak:
Enabled: true
# Encourage using public_send to prove that you actually want to bypass visibility.
Style/Send:
Enabled: true
# If you interpolate a literal, just include it in the string itself.
Lint/LiteralInInterpolation:
Enabled: true
# Personal preference. Makes the diffs smaller.
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: consistent_comma
# Seems buggy for now.
Layout/ClosingHeredocIndentation:
Enabled: false
# Enable new cops
Layout/SpaceAroundMethodCallOperator:
Enabled: true
Lint/RaiseException:
Enabled: true
Lint/StructNewOverride:
Enabled: true
Style/ExponentialNotation:
Enabled: true
Style/HashEachMethods:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true