-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path.rubocop.yml
72 lines (59 loc) · 1.58 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
require:
- rubocop-minitest
- rubocop-performance
- rubocop-rake
# Set our base version of ruby and enable all cops.
AllCops:
TargetRubyVersion: 2.6
NewCops: enable
# Turn this off for certain files where we have extra documentation
# towards the end of the file, after a block of private methods.
Lint/UselessAccessModifier:
Exclude:
- 'lib/cff/index.rb'
- 'lib/cff/model.rb'
- 'lib/cff/reference.rb'
# I think 'has_key?' looks better than 'key?'.
Style/PreferredHashMethods:
EnforcedStyle: verbose
# Allow a non-standard error type.
Style/RaiseArgs:
AllowedCompactTypes:
- ValidationError
- CFF::ValidationError
# Allow long lines in the tests.
Layout/LineLength:
Max: 100
Exclude:
- 'test/**/*.rb'
# Force ruby19 style hash keys, but be consistent within a hash.
Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys
# Enforce %w notation in the library code, but be less strict in tests.
Style/WordArray:
Exclude:
- 'test/**/*.rb'
# Ignore ABC failures in the tests.
Metrics/AbcSize:
Exclude:
- 'test/**/*.rb'
# Ignore block length failures in the tests.
Metrics/BlockLength:
Exclude:
- 'cff.gemspec'
- 'test/**/*.rb'
# Set a more reasonable method length and ignore failures in the tests.
Metrics/MethodLength:
Max: 20
Exclude:
- 'test/**/*.rb'
# Set a more reasonable class length and ignore failures in the tests.
Metrics/ClassLength:
Max: 150
Exclude:
- 'test/**/*.rb'
# This is still too high, but we'll get there.
Minitest/MultipleAssertions:
Max: 10
Style/DocumentDynamicEvalDefinition:
Enabled: true