-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
69 lines (56 loc) · 1.79 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
inherit_from: .rubocop_todo.yml
# Turn this off for now. CI checks different versions of ruby anyway.
Gemspec/RequiredRubyVersion:
Exclude:
- 'zip-container.gemspec'
# Turn this off for now. I think we can't enable this until rubyzip
# does, and respects it, too.
Style/FrozenStringLiteralComment:
Enabled: false
# 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/zip-container/file.rb'
- 'lib/zip-container/dir.rb'
# Force ruby19 style hash keys, but be consistent within a hash.
Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys
# I think 'has_key?' looks better than 'key?'.
Style/PreferredHashMethods:
EnforcedStyle: verbose
# Exclude this file for now. Guard clauses in this file would be
# overly clunky at the moment.
Style/GuardClause:
Exclude:
- 'lib/zip-container/file.rb'
# 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
# Allow long lines in the tests.
Metrics/LineLength:
Exclude:
- 'lib/zip-container/dir.rb'
- 'test/**/*.rb'
# 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 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'