-
Notifications
You must be signed in to change notification settings - Fork 4
/
.rubocop.yml
65 lines (55 loc) · 1.89 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
AllCops:
Exclude:
- 'vendor/**/*'
- 'spec/fixtures/**/*'
Style/CollectionMethods:
# Mapping from undesired method to desired_method
# e.g. to use `detect` over `find`:
#
# CollectionMethods:
# PreferredMethods:
# find: detect
PreferredMethods:
collect: 'map'
collect!: 'map!'
reduce: 'inject'
detect: 'find'
select: 'find_all'
# I don't want to write documentation for every class
Style/Documentation:
Description: "Document classes and non-namespace modules."
Enabled: false
# I will use the %r syntax even if there's only one slash
Style/RegexpLiteral:
Description: >-
Use %r for regular expressions matching more than
`MaxSlashes` "/" characters.
StyleGuide: "https://github.com/bbatsov/ruby-style-guide#percent-r"
MaxSlashes: 0
Enabled: true
# I prefer raise to fail
Style/SignalException:
Description: "Checks for proper usage of fail and raise."
StyleGuide: "https://github.com/bbatsov/ruby-style-guide#fail-method"
Enabled: false
# Expect a final blank line
Style/TrailingBlankLines:
Description: "Checks trailing blank lines and final newline."
StyleGuide: "https://github.com/bbatsov/ruby-style-guide#newline-eof"
Enabled: true
EnforcedStyle: final_blank_line
Style/DoubleNegation:
Description: 'Checks for uses of double negation (!!).'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
Enabled: false
Style/ClassCheck:
Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
Enabled: false
Style/TrailingBlankLines:
Description: 'Checks trailing blank lines and final newline.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
Enabled: false
Lint/UnusedMethodArgument:
Description: 'Checks for unused method arguments.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
Enabled: false