-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
179 lines (135 loc) · 3.83 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
inherit_from: ./config/rubocop/default.yml
AllCops:
DisabledByDefault: true
Layout/AlignHash:
EnforcedColonStyle: key
EnforcedLastArgumentHashStyle: always_ignore
EnforcedHashRocketStyle: key
Style/ClassAndModuleChildren:
EnforcedStyle: compact
Style/CollectionMethods:
PreferredMethods:
collect: 'map'
collect!: 'map!'
inject: 'reduce'
detect: 'detect'
find_all: 'select'
Layout/SpaceInLambdaLiteral:
EnforcedStyle: require_space
Style/MethodDefParentheses:
EnforcedStyle: require_parentheses
Layout/MultilineAssignmentLayout:
EnforcedStyle: same_line
Style/NonNilCheck:
IncludeSemanticChanges: true
Style/OptionHash:
# A list of parameter names that will be flagged by this cop.
SuspiciousParamNames: []
Style/RaiseArgs:
EnforcedStyle: compact
Style/RedundantReturn:
AllowMultipleReturnValues: true
Style/Semicolon:
AllowAsExpressionSeparator: true
Style/SingleLineBlockParams:
Methods:
- reduce:
- memo
- elem
- inject:
- memo
- elem
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/TernaryParentheses:
EnforcedStyle: require_parentheses_when_complex
Style/WordArray:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Metrics/ParameterLists:
Max: 6
CountKeywordArgs: false
Lint/InheritException:
EnforcedStyle: standard_error
Rails/SkipsModelValidations:
Blacklist: []
Performance/StringReplacement:
Description: >-
Use `tr` instead of `gsub` when you are replacing the same
number of characters. Use `delete` instead of `gsub` when
you are deleting characters.
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
Enabled: false
Style/Documentation:
Description: 'Document classes and non-namespace modules.'
Enabled: false
Exclude:
- 'spec/**/*'
- 'test/**/*'
Metrics/LineLength:
Max: 150
# To make it possible to copy or click on URIs in the code, we allow lines
# containing a URI to be longer than Max.
AllowHeredoc: true
AllowURI: true
URISchemes:
- http
- https
# The IgnoreCopDirectives option causes the LineLength rule to ignore cop
# directives like '# rubocop: enable ...' when calculating a line's length.
IgnoreCopDirectives: false
# The IgnoredPatterns option is a list of !ruby/regexp and/or string
# elements. Strings will be converted to Regexp objects. A line that matches
# any regular expression listed in this option will be ignored by LineLength.
IgnoredPatterns: []
Naming/AccessorMethodName:
Description: Check the naming of accessor methods for get_/set_.
StyleGuide: '#accessor_mutator_method_names'
Enabled: false
Metrics/AbcSize:
# The ABC size is a calculated magnitude, so this number can be an Integer or
# a Float.
Enabled: false
Style/GuardClause:
Description: 'Check for conditionals that can be replaced with guard clauses'
StyleGuide: '#no-nested-conditionals'
Enabled: false
Style/SymbolArray:
EnforcedStyle: brackets
Metrics/ClassLength:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Style/SafeNavigation:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
Metrics/BlockNesting:
CountBlocks: false
Max: 4
Lint/UnderscorePrefixedVariableName:
Enabled: false
Style/EmptyMethod:
EnforcedStyle: expanded
Performance/Casecmp:
Enabled: false
Style/RedundantBegin:
Enabled: false
Lint/AmbiguousBlockAssociation:
Enabled: false
Style/SpecialGlobalVars:
Enabled: false
Style/EachWithObject:
Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
Enabled: false
Lint/AssignmentInCondition:
Enabled: false
Layout/EndAlignment:
EnforcedStyleAlignWith: variable
Layout/IndentationWidth:
Enabled: true