forked from duytd/releasable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
97 lines (76 loc) · 1.92 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
85
86
87
88
89
90
91
92
93
94
95
96
97
AllCops:
TargetRubyVersion: 2.3
Exclude:
- 'spec/dummy/**/*'
- 'Gemfile'
- 'bin/*'
- 'Rakefile'
- '*.gemspec'
Rails:
Enabled: true
# Accept single-line methods with no body
SingleLineMethods:
AllowIfMethodIsEmpty: true
# Top-level documentation of classes and modules are needless
Documentation:
Enabled: false
# Allow to chain of block after another block that spans multiple lines
MultilineBlockChain:
Enabled: false
# Allow `->` literal for multi line blocks
Lambda:
Enabled: false
# Both nested and compact are okay
ClassAndModuleChildren:
Enabled: false
# Specifying param names is unnecessary
Style/SingleLineBlockParams:
Enabled: false
# Prefer Kernel#sprintf
FormatString:
EnforcedStyle: sprintf
# Maximum line length
LineLength:
Max: 100
# Use "postfix if/unless" if the lenght is less than this
IfUnlessModifier:
MaxLineLength: 80
# Maximum method length
MethodLength:
Max: 20
# Tune to MethodLength
Metrics/AbcSize:
Max: 30
# Tune to MethodLength
Metrics/ClassLength:
Max: 200
# Prefer double_quotes strings unless your string literal contains escape chars
StringLiterals:
EnforcedStyle: double_quotes
# Prefer raise over fail for exceptions
Style/SignalException:
EnforcedStyle: only_raise
# Allow empty condition in case statements
Style/EmptyCaseCondition:
Enabled: false
# Prefer trailing comma in argument lists
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma
# Prefer trailing comma in array and hash literals
Style/TrailingCommaInLiteral:
EnforcedStyleForMultiline: comma
# Prefer parentheses for almost all percent literals
Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%i': '()'
'%I': '()'
'%w': '()'
'%W': '()'
# Allow `has_` as prefix of predicate methods
Style/PredicateName:
NamePrefixBlacklist:
- is_
- have_
# Prefer `has_?` style for Hash methods
Style/PreferredHashMethods:
EnforcedStyle: verbose