forked from mbj/unparser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrubocop.yml
More file actions
105 lines (80 loc) · 2.07 KB
/
rubocop.yml
File metadata and controls
105 lines (80 loc) · 2.07 KB
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
98
99
100
101
102
103
104
105
inherit_from: ../.rubocop.yml
AllCops:
Include:
- '**/*.rake'
- 'Gemfile'
- 'Gemfile.triage'
TargetRubyVersion: 2.1
# Avoid parameter lists longer than five parameters.
ParameterLists:
Max: 3
CountKeywordArgs: true
MethodLength:
CountComments: false
Max: 17
AbcSize:
Max: 18
# Avoid more than `Max` levels of nesting.
BlockNesting:
Max: 3
# Align with the style guide.
CollectionMethods:
PreferredMethods:
collect: 'map'
inject: 'reduce'
find: 'detect'
find_all: 'select'
# Limit line length
LineLength:
Max: 113 # TODO: lower to 79 once the rubocop branch in shared/Gemfile is removed
ClassLength:
Max: 204
# Prefer modifiers and explicit if statements over returning early for small methods
GuardClause:
Enabled: false
Metrics/BlockLength:
Exclude:
# Ignore RSpec DSL
- spec/**/*
# Flags freezes for singletons that could still be mutated like Regexps
RedundantFreeze:
Enabled: false
# Allow Fixnum and Bignum. This Gem supports versions before 2.4
UnifiedInteger:
Enabled: false
# Disabled because of indenting with private keyword in class bodies.
IndentationWidth:
Enabled: false
# I like raise more
SignalException:
Enabled: false
# False positive in unparser source
OneLineConditional:
Enabled: false
Documentation:
Enabled: false
# Disable documentation checking until a class needs to be documented once
Documentation:
Enabled: false
# Do not favor modifier if/unless usage when you have a single-line body
IfUnlessModifier:
Enabled: false
# Allow case equality operator (in limited use within the specs)
CaseEquality:
Enabled: false
# Constants do not always have to use SCREAMING_SNAKE_CASE
ConstantName:
Enabled: false
# Not all trivial readers/writers can be defined with attr_* methods
TrivialAccessors:
Enabled: false
# I like to have an empty line before closing the currently opened body
EmptyLinesAroundBlockBody:
Enabled: false
EmptyLinesAroundClassBody:
Enabled: false
EmptyLinesAroundModuleBody:
Enabled: false
# I like my style more
AccessModifierIndentation:
Enabled: false