-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
57 lines (45 loc) · 1.33 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
require: rubocop-performance
inherit_from: .rubocop_todo.yml
AllCops:
TargetRubyVersion: 2.5
# Enforce empty lines at the beginning of classes.
Layout/EmptyLinesAroundClassBody:
EnforcedStyle: beginning_only
# Allow empty lines, or not, around module bodies. I like a line at the
# beginning, but not the end, but this is not an option in RuboCop.
Layout/EmptyLinesAroundModuleBody:
Enabled: false
# Ignore ABC failures in the tests.
Metrics/AbcSize:
Exclude:
- 'test/**/*.rb'
# Ignore block length failures in the tests.
Metrics/BlockLength:
Exclude:
- 'test/**/*.rb'
# Set a more reasonable class length and ignore failures in the tests.
Metrics/ClassLength:
Max: 250
Exclude:
- 'test/**/*.rb'
# Set a more reasonable method length and ignore failures in the tests.
Metrics/MethodLength:
Max: 15
Exclude:
- 'test/**/*.rb'
# Set a more reasonable module length and ignore failures in the tests.
# Also allow the API module to be very long as it just maps lots of methods.
Metrics/ModuleLength:
Exclude:
- 'lib/ffi/openmpt/api.rb'
- 'test/**/*.rb'
# Allow compact child definitions in the tests for brevity.
Style/ClassAndModuleChildren:
Exclude:
- 'test/**/*'
Style/MixinUsage:
Exclude:
- 'examples/**/*'
# Use brackets style for symbol arrays.
Style/SymbolArray:
EnforcedStyle: brackets