-
Notifications
You must be signed in to change notification settings - Fork 9
/
.rubocop.yml
53 lines (43 loc) · 1.48 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
AllCops:
TargetRubyVersion: 2.0
# Cops that are being modified because whitespace helps with readability
Layout/CaseIndentation:
Enabled: false
Layout/EmptyLinesAroundModuleBody:
Enabled: false
Layout/EmptyLinesAroundClassBody:
EnforcedStyle: empty_lines
Exclude:
- 'testing/rspec/spec/**/*' # Random fake/monkey patch classes for tests don't need a bunch of white space
Layout/EmptyLines:
Enabled: false
Layout/EmptyLinesAroundBlockBody:
Enabled: false
# More readability
Naming/VariableNumber:
EnforcedStyle: snake_case
# No, I like immediately knowing that something is a set of mutually exclusive
# paths because it is a `case` statement rather than having to parse `if/else` logic
Style/EmptyCaseCondition:
Enabled: false
# Most people will be looking at the code in a text editor, not a terminal
Metrics/LineLength:
Max: 120
# The test code is safe to evaluate
Security/Eval:
Exclude:
- 'testing/**/*'
Metrics/BlockLength:
Exclude:
- 'testing/rspec/spec/**/*' # RSpec suites are inherently a bunch of large, nested blocks
- 'cuke_slicer.gemspec' # As is a gemspec
- 'rakefiles/**/*' # As are Rake namespaces
# Still within understanding as long as other complexity cops aren't triggering
Metrics/MethodLength:
Max: 15
Style/Documentation:
Exclude:
- 'testing/rspec/spec/**/*' # Random fake/monkey patch classes for tests don't need documentation
# Non-specific exception handling is fine
Lint/RescueWithoutErrorClass:
Enabled: false