ribose-cli 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.rubocop.yml +539 -970
- data/Gemfile +3 -0
- data/README.md +316 -7
- data/bin/ribose +22 -0
- data/lib/ribose/cli/auth.rb +9 -0
- data/lib/ribose/cli/command.rb +55 -0
- data/lib/ribose/cli/commands/base.rb +80 -0
- data/lib/ribose/cli/commands/conversation.rb +114 -0
- data/lib/ribose/cli/commands/file.rb +96 -0
- data/lib/ribose/cli/commands/invitation.rb +81 -0
- data/lib/ribose/cli/commands/join_space.rb +78 -0
- data/lib/ribose/cli/commands/member.rb +81 -0
- data/lib/ribose/cli/commands/message.rb +98 -0
- data/lib/ribose/cli/commands/note.rb +98 -0
- data/lib/ribose/cli/commands/space.rb +86 -0
- data/lib/ribose/cli/rcfile.rb +57 -0
- data/lib/ribose/cli/util.rb +22 -0
- data/lib/ribose/cli/version.rb +2 -2
- data/lib/ribose/cli.rb +21 -2
- data/ribose-cli.gemspec +7 -1
- data/spec/acceptance/config_spec.rb +17 -0
- data/spec/acceptance/conversation_spec.rb +90 -0
- data/spec/acceptance/file_spec.rb +80 -0
- data/spec/acceptance/invitation_spec.rb +109 -0
- data/spec/acceptance/join_space_spec.rb +73 -0
- data/spec/acceptance/member_spec.rb +87 -0
- data/spec/acceptance/message_spec.rb +67 -0
- data/spec/acceptance/note_spec.rb +61 -0
- data/spec/acceptance/space_spec.rb +112 -0
- data/spec/fixtures/.riboserc +3 -0
- data/spec/ribose/cli/rcfile_spec.rb +21 -0
- data/spec/spec_helper.rb +12 -1
- data/spec/support/console_helper.rb +29 -0
- metadata +87 -5
- data/spec/ribose/cli_spec.rb +0 -4
data/.rubocop.yml
CHANGED
@@ -1,1076 +1,645 @@
|
|
1
1
|
AllCops:
|
2
2
|
Include:
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
- "**/*.rake"
|
4
|
+
- "**/Gemfile"
|
5
|
+
- "**/Rakefile"
|
6
|
+
|
6
7
|
Exclude:
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
Rails:
|
12
|
-
Enabled: true
|
13
|
-
Style/AndOr:
|
14
|
-
Description: Use &&/|| instead of and/or.
|
15
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
|
16
|
-
Enabled: true
|
17
|
-
EnforcedStyle: always
|
18
|
-
SupportedStyles:
|
19
|
-
- always
|
20
|
-
- conditionals
|
21
|
-
Style/BarePercentLiterals:
|
22
|
-
Description: Checks if usage of %() or %Q() matches configuration.
|
23
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
|
24
|
-
Enabled: true
|
25
|
-
EnforcedStyle: bare_percent
|
26
|
-
SupportedStyles:
|
27
|
-
- percent_q
|
28
|
-
- bare_percent
|
29
|
-
Style/BracesAroundHashParameters:
|
30
|
-
Description: Enforce braces style around hash parameters.
|
31
|
-
Enabled: true
|
32
|
-
EnforcedStyle: no_braces
|
33
|
-
SupportedStyles:
|
34
|
-
- braces
|
35
|
-
- no_braces
|
36
|
-
- context_dependent
|
37
|
-
Style/ClassAndModuleChildren:
|
38
|
-
Description: Checks style of children classes and modules.
|
39
|
-
Enabled: false
|
40
|
-
EnforcedStyle: nested
|
41
|
-
SupportedStyles:
|
42
|
-
- nested
|
43
|
-
- compact
|
44
|
-
Style/ClassCheck:
|
45
|
-
Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
|
46
|
-
Enabled: true
|
47
|
-
EnforcedStyle: is_a?
|
48
|
-
SupportedStyles:
|
49
|
-
- is_a?
|
50
|
-
- kind_of?
|
51
|
-
Style/CollectionMethods:
|
52
|
-
Description: Preferred collection methods.
|
53
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
54
|
-
Enabled: true
|
55
|
-
PreferredMethods:
|
56
|
-
collect: map
|
57
|
-
collect!: map!
|
58
|
-
inject: reduce
|
59
|
-
detect: find
|
60
|
-
find_all: select
|
61
|
-
find: detect
|
62
|
-
Style/CommentAnnotation:
|
63
|
-
Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
|
64
|
-
REVIEW).
|
65
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
|
66
|
-
Enabled: false
|
67
|
-
Keywords:
|
68
|
-
- TODO
|
69
|
-
- FIXME
|
70
|
-
- OPTIMIZE
|
71
|
-
- HACK
|
72
|
-
- REVIEW
|
73
|
-
Style/Encoding:
|
74
|
-
Description: Use UTF-8 as the source file encoding.
|
75
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
|
76
|
-
Enabled: false
|
77
|
-
EnforcedStyle: always
|
78
|
-
SupportedStyles:
|
79
|
-
- when_needed
|
80
|
-
- always
|
81
|
-
Style/FileName:
|
82
|
-
Description: Use snake_case for source file names.
|
83
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
84
|
-
Enabled: false
|
85
|
-
Exclude: []
|
86
|
-
Style/FrozenStringLiteralComment:
|
87
|
-
Description: >-
|
88
|
-
Add the frozen_string_literal comment to the top of files
|
89
|
-
to help transition from Ruby 2.3.0 to Ruby 3.0.
|
8
|
+
- db/schema.rb
|
9
|
+
|
10
|
+
Naming/AccessorMethodName:
|
11
|
+
Description: Check the naming of accessor methods for get_/set_.
|
90
12
|
Enabled: false
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
EnforcedStyle: each
|
96
|
-
SupportedStyles:
|
97
|
-
- for
|
98
|
-
- each
|
99
|
-
Style/FormatString:
|
100
|
-
Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
|
101
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
|
102
|
-
Enabled: false
|
103
|
-
EnforcedStyle: format
|
104
|
-
SupportedStyles:
|
105
|
-
- format
|
106
|
-
- sprintf
|
107
|
-
- percent
|
108
|
-
Style/GlobalVars:
|
109
|
-
Description: Do not introduce global variables.
|
110
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
|
13
|
+
|
14
|
+
Style/Alias:
|
15
|
+
Description: 'Use alias_method instead of alias.'
|
16
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
|
111
17
|
Enabled: false
|
112
|
-
|
113
|
-
Style/
|
114
|
-
Description:
|
115
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
116
|
-
Enabled: false
|
117
|
-
MinBodyLength: 1
|
118
|
-
Style/HashSyntax:
|
119
|
-
Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
|
120
|
-
1, :b => 2 }.'
|
121
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
|
122
|
-
Enabled: true
|
123
|
-
EnforcedStyle: ruby19
|
124
|
-
SupportedStyles:
|
125
|
-
- ruby19
|
126
|
-
- hash_rockets
|
127
|
-
Style/IfUnlessModifier:
|
128
|
-
Description: Favor modifier if/unless usage when you have a single-line body.
|
129
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
18
|
+
|
19
|
+
Style/ArrayJoin:
|
20
|
+
Description: 'Use Array#join instead of Array#*.'
|
21
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
|
130
22
|
Enabled: false
|
131
|
-
|
132
|
-
Style/
|
133
|
-
Description: Use
|
134
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
23
|
+
|
24
|
+
Style/AsciiComments:
|
25
|
+
Description: 'Use only ascii symbols in comments.'
|
26
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
|
135
27
|
Enabled: false
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
-
|
140
|
-
Style/Next:
|
141
|
-
Description: Use `next` to skip iteration instead of a condition at the end.
|
142
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
143
|
-
Enabled: false
|
144
|
-
EnforcedStyle: skip_modifier_ifs
|
145
|
-
MinBodyLength: 3
|
146
|
-
SupportedStyles:
|
147
|
-
- skip_modifier_ifs
|
148
|
-
- always
|
149
|
-
Style/NonNilCheck:
|
150
|
-
Description: Checks for redundant nil checks.
|
151
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
|
152
|
-
Enabled: true
|
153
|
-
IncludeSemanticChanges: false
|
154
|
-
Style/MethodDefParentheses:
|
155
|
-
Description: Checks if the method definitions have or don't have parentheses.
|
156
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
157
|
-
Enabled: true
|
158
|
-
EnforcedStyle: require_parentheses
|
159
|
-
SupportedStyles:
|
160
|
-
- require_parentheses
|
161
|
-
- require_no_parentheses
|
162
|
-
Style/MethodName:
|
163
|
-
Description: Use the configured style when naming methods.
|
164
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
165
|
-
Enabled: true
|
166
|
-
EnforcedStyle: snake_case
|
167
|
-
SupportedStyles:
|
168
|
-
- snake_case
|
169
|
-
- camelCase
|
170
|
-
Style/NumericLiterals:
|
171
|
-
Description: Add underscores to large numeric literals to improve their readability.
|
172
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
|
28
|
+
|
29
|
+
Naming/AsciiIdentifiers:
|
30
|
+
Description: 'Use only ascii symbols in identifiers.'
|
31
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
|
173
32
|
Enabled: false
|
174
|
-
|
175
|
-
Style/
|
33
|
+
|
34
|
+
Style/Attr:
|
35
|
+
Description: 'Checks for uses of Module#attr.'
|
36
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
|
176
37
|
Enabled: false
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
AllowSafeAssignment: true
|
182
|
-
Style/PercentLiteralDelimiters:
|
183
|
-
Description: Use `%`-literal delimiters consistently
|
184
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
185
|
-
Enabled: false
|
186
|
-
PreferredDelimiters:
|
187
|
-
"%": "()"
|
188
|
-
"%i": "()"
|
189
|
-
"%q": "()"
|
190
|
-
"%Q": "()"
|
191
|
-
"%r": "{}"
|
192
|
-
"%s": "()"
|
193
|
-
"%w": "()"
|
194
|
-
"%W": "()"
|
195
|
-
"%x": "()"
|
196
|
-
Style/PercentQLiterals:
|
197
|
-
Description: Checks if uses of %Q/%q match the configured preference.
|
198
|
-
Enabled: true
|
199
|
-
EnforcedStyle: lower_case_q
|
200
|
-
SupportedStyles:
|
201
|
-
- lower_case_q
|
202
|
-
- upper_case_q
|
203
|
-
Style/PredicateName:
|
204
|
-
Description: Check the names of predicate methods.
|
205
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
206
|
-
Enabled: true
|
207
|
-
NamePrefix:
|
208
|
-
- is_
|
209
|
-
- has_
|
210
|
-
- have_
|
211
|
-
NamePrefixBlacklist:
|
212
|
-
- is_
|
213
|
-
Style/RaiseArgs:
|
214
|
-
Description: Checks the arguments passed to raise/fail.
|
215
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
|
216
|
-
Enabled: false
|
217
|
-
EnforcedStyle: exploded
|
218
|
-
SupportedStyles:
|
219
|
-
- compact
|
220
|
-
- exploded
|
221
|
-
Style/RedundantReturn:
|
222
|
-
Description: Don't use return where it's not required.
|
223
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
|
224
|
-
Enabled: true
|
225
|
-
AllowMultipleReturnValues: false
|
226
|
-
Style/RegexpLiteral:
|
227
|
-
Description: Use %r for regular expressions matching more than `MaxSlashes` '/'
|
228
|
-
characters. Use %r only for regular expressions matching more than `MaxSlashes`
|
229
|
-
'/' character.
|
230
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
|
231
|
-
Enabled: false
|
232
|
-
Style/Semicolon:
|
233
|
-
Description: Don't use semicolons to terminate expressions.
|
234
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
|
235
|
-
Enabled: true
|
236
|
-
AllowAsExpressionSeparator: false
|
237
|
-
Style/SignalException:
|
238
|
-
Description: Checks for proper usage of fail and raise.
|
239
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
240
|
-
Enabled: false
|
241
|
-
EnforcedStyle: semantic
|
242
|
-
SupportedStyles:
|
243
|
-
- only_raise
|
244
|
-
- only_fail
|
245
|
-
- semantic
|
246
|
-
Style/SingleLineBlockParams:
|
247
|
-
Description: Enforces the names of some block params.
|
248
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
|
249
|
-
Enabled: false
|
250
|
-
Methods:
|
251
|
-
- reduce:
|
252
|
-
- a
|
253
|
-
- e
|
254
|
-
- inject:
|
255
|
-
- a
|
256
|
-
- e
|
257
|
-
Style/SingleLineMethods:
|
258
|
-
Description: Avoid single-line methods.
|
259
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
38
|
+
|
39
|
+
Metrics/BlockNesting:
|
40
|
+
Description: 'Avoid excessive block nesting'
|
41
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
|
260
42
|
Enabled: false
|
261
|
-
|
262
|
-
Style/
|
263
|
-
Description:
|
264
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
265
|
-
Enabled: true
|
266
|
-
EnforcedStyle: double_quotes
|
267
|
-
SupportedStyles:
|
268
|
-
- single_quotes
|
269
|
-
- double_quotes
|
270
|
-
Style/StringLiteralsInInterpolation:
|
271
|
-
Description: Checks if uses of quotes inside expressions in interpolated strings
|
272
|
-
match the configured preference.
|
273
|
-
Enabled: true
|
274
|
-
EnforcedStyle: single_quotes
|
275
|
-
SupportedStyles:
|
276
|
-
- single_quotes
|
277
|
-
- double_quotes
|
278
|
-
Style/SymbolProc:
|
279
|
-
Description: Use symbols as procs instead of blocks when possible.
|
280
|
-
Enabled: true
|
281
|
-
IgnoredMethods:
|
282
|
-
- respond_to
|
283
|
-
Style/TrailingCommaInLiteral:
|
284
|
-
Description: Checks for trailing comma in parameter lists and literals.
|
285
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
286
|
-
Enabled: true
|
287
|
-
EnforcedStyleForMultiline: comma
|
288
|
-
SupportedStylesForMultiline:
|
289
|
-
- comma
|
290
|
-
- no_comma
|
291
|
-
Style/TrailingCommaInArguments:
|
292
|
-
Description: Checks for trailing comma in parameter lists and literals.
|
293
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
294
|
-
Enabled: true
|
295
|
-
EnforcedStyleForMultiline: comma
|
296
|
-
SupportedStylesForMultiline:
|
297
|
-
- comma
|
298
|
-
- no_comma
|
299
|
-
Style/TrivialAccessors:
|
300
|
-
Description: Prefer attr_* methods to trivial readers/writers.
|
301
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
|
302
|
-
Enabled: false
|
303
|
-
ExactNameMatch: false
|
304
|
-
AllowPredicates: false
|
305
|
-
AllowDSLWriters: false
|
306
|
-
Whitelist:
|
307
|
-
- to_ary
|
308
|
-
- to_a
|
309
|
-
- to_c
|
310
|
-
- to_enum
|
311
|
-
- to_h
|
312
|
-
- to_hash
|
313
|
-
- to_i
|
314
|
-
- to_int
|
315
|
-
- to_io
|
316
|
-
- to_open
|
317
|
-
- to_path
|
318
|
-
- to_proc
|
319
|
-
- to_r
|
320
|
-
- to_regexp
|
321
|
-
- to_str
|
322
|
-
- to_s
|
323
|
-
- to_sym
|
324
|
-
Style/VariableName:
|
325
|
-
Description: Use the configured style when naming variables.
|
326
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
327
|
-
Enabled: true
|
328
|
-
EnforcedStyle: snake_case
|
329
|
-
SupportedStyles:
|
330
|
-
- snake_case
|
331
|
-
- camelCase
|
332
|
-
Style/WhileUntilModifier:
|
333
|
-
Description: Favor modifier while/until usage when you have a single-line body.
|
334
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
|
43
|
+
|
44
|
+
Style/CaseEquality:
|
45
|
+
Description: 'Avoid explicit use of the case equality operator(===).'
|
46
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
|
335
47
|
Enabled: false
|
336
|
-
|
337
|
-
Style/
|
338
|
-
Description:
|
339
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
48
|
+
|
49
|
+
Style/CharacterLiteral:
|
50
|
+
Description: 'Checks for uses of character literals.'
|
51
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
|
340
52
|
Enabled: false
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
Description: A calculated magnitude based on number of assignments, branches, and
|
345
|
-
conditions.
|
346
|
-
Enabled: true
|
347
|
-
Max: 15
|
348
|
-
Metrics/BlockLength:
|
349
|
-
Exclude:
|
350
|
-
- "spec/**/*"
|
351
|
-
Metrics/BlockNesting:
|
352
|
-
Description: Avoid excessive block nesting
|
353
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
|
53
|
+
|
54
|
+
Style/ClassAndModuleChildren:
|
55
|
+
Description: 'Checks style of children classes and modules.'
|
354
56
|
Enabled: true
|
355
|
-
|
57
|
+
EnforcedStyle: nested
|
58
|
+
|
356
59
|
Metrics/ClassLength:
|
357
|
-
Description: Avoid classes longer than 100 lines of code.
|
60
|
+
Description: 'Avoid classes longer than 100 lines of code.'
|
358
61
|
Enabled: false
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
Description: A complexity metric that is strongly correlated to the number of test
|
363
|
-
cases needed to validate a method.
|
364
|
-
Enabled: true
|
365
|
-
Max: 6
|
366
|
-
Metrics/LineLength:
|
367
|
-
Description: Limit lines to 80 characters.
|
368
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
|
369
|
-
Enabled: true
|
370
|
-
Max: 80
|
371
|
-
AllowURI: true
|
372
|
-
URISchemes:
|
373
|
-
- http
|
374
|
-
- https
|
375
|
-
Metrics/MethodLength:
|
376
|
-
Description: Avoid methods longer than 10 lines of code.
|
377
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
378
|
-
Enabled: true
|
379
|
-
CountComments: true
|
380
|
-
Max: 10
|
381
|
-
Exclude:
|
382
|
-
- "spec/**/*"
|
383
|
-
Metrics/ParameterLists:
|
384
|
-
Description: Avoid long parameter lists.
|
385
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
386
|
-
Enabled: true
|
387
|
-
Max: 5
|
388
|
-
CountKeywordArgs: true
|
389
|
-
Metrics/PerceivedComplexity:
|
390
|
-
Description: A complexity metric geared towards measuring complexity for a human
|
391
|
-
reader.
|
392
|
-
Enabled: true
|
393
|
-
Max: 7
|
394
|
-
Lint/AssignmentInCondition:
|
395
|
-
Description: Don't use assignment in conditions.
|
396
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
62
|
+
|
63
|
+
Metrics/ModuleLength:
|
64
|
+
Description: 'Avoid modules longer than 100 lines of code.'
|
397
65
|
Enabled: false
|
398
|
-
|
399
|
-
|
400
|
-
Description:
|
401
|
-
|
402
|
-
EnforcedStyleAlignWith: keyword
|
403
|
-
SupportedStylesAlignWith:
|
404
|
-
- keyword
|
405
|
-
- variable
|
406
|
-
Lint/DefEndAlignment:
|
407
|
-
Description: Align ends corresponding to defs correctly.
|
408
|
-
Enabled: true
|
409
|
-
EnforcedStyleAlignWith: start_of_line
|
410
|
-
SupportedStylesAlignWith:
|
411
|
-
- start_of_line
|
412
|
-
- def
|
413
|
-
Rails/ActionFilter:
|
414
|
-
Description: Enforces consistent use of action filter methods.
|
415
|
-
Enabled: true
|
416
|
-
EnforcedStyle: action
|
417
|
-
SupportedStyles:
|
418
|
-
- action
|
419
|
-
- filter
|
420
|
-
Include:
|
421
|
-
- app/controllers/**/*.rb
|
422
|
-
Rails/HasAndBelongsToMany:
|
423
|
-
Description: Prefer has_many :through to has_and_belongs_to_many.
|
424
|
-
Enabled: true
|
425
|
-
Include:
|
426
|
-
- app/models/**/*.rb
|
427
|
-
Rails/HttpPositionalArguments:
|
66
|
+
|
67
|
+
Style/ClassVars:
|
68
|
+
Description: 'Avoid the use of class variables.'
|
69
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
|
428
70
|
Enabled: false
|
429
|
-
|
430
|
-
|
431
|
-
Enabled: true
|
432
|
-
Include:
|
433
|
-
- app/**/*.rb
|
434
|
-
- config/**/*.rb
|
435
|
-
- db/**/*.rb
|
436
|
-
- lib/**/*.rb
|
437
|
-
Rails/ReadWriteAttribute:
|
438
|
-
Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
|
439
|
-
Enabled: true
|
440
|
-
Include:
|
441
|
-
- app/models/**/*.rb
|
442
|
-
Rails/ScopeArgs:
|
443
|
-
Description: Checks the arguments of ActiveRecord scopes.
|
444
|
-
Enabled: true
|
445
|
-
Include:
|
446
|
-
- app/models/**/*.rb
|
447
|
-
Rails/Validation:
|
448
|
-
Description: Use validates :attribute, hash of validations.
|
71
|
+
|
72
|
+
Style/CollectionMethods:
|
449
73
|
Enabled: true
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
74
|
+
PreferredMethods:
|
75
|
+
find: detect
|
76
|
+
inject: reduce
|
77
|
+
collect: map
|
78
|
+
find_all: select
|
79
|
+
|
80
|
+
Style/ColonMethodCall:
|
81
|
+
Description: 'Do not use :: for method call.'
|
82
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
|
454
83
|
Enabled: false
|
455
|
-
|
456
|
-
|
457
|
-
|
84
|
+
|
85
|
+
Style/CommentAnnotation:
|
86
|
+
Description: >-
|
87
|
+
Checks formatting of special comments
|
88
|
+
(TODO, FIXME, OPTIMIZE, HACK, REVIEW).
|
89
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
|
458
90
|
Enabled: false
|
459
|
-
|
460
|
-
|
461
|
-
|
91
|
+
|
92
|
+
Metrics/AbcSize:
|
93
|
+
Description: >-
|
94
|
+
A calculated magnitude based on number of assignments,
|
95
|
+
branches, and conditions.
|
462
96
|
Enabled: false
|
463
|
-
|
464
|
-
|
97
|
+
|
98
|
+
Metrics/BlockLength:
|
99
|
+
CountComments: true # count full line comments?
|
100
|
+
Max: 25
|
101
|
+
ExcludedMethods: []
|
102
|
+
Exclude:
|
103
|
+
- "spec/**/*"
|
104
|
+
|
105
|
+
Metrics/CyclomaticComplexity:
|
106
|
+
Description: >-
|
107
|
+
A complexity metric that is strongly correlated to the number
|
108
|
+
of test cases needed to validate a method.
|
465
109
|
Enabled: false
|
466
|
-
|
467
|
-
|
468
|
-
|
110
|
+
|
111
|
+
Rails/Delegate:
|
112
|
+
Description: 'Prefer delegate method for delegations.'
|
469
113
|
Enabled: false
|
470
|
-
|
471
|
-
|
472
|
-
|
114
|
+
|
115
|
+
Style/PreferredHashMethods:
|
116
|
+
Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
|
117
|
+
StyleGuide: '#hash-key'
|
473
118
|
Enabled: false
|
474
|
-
|
475
|
-
|
476
|
-
|
119
|
+
|
120
|
+
Style/Documentation:
|
121
|
+
Description: 'Document classes and non-namespace modules.'
|
477
122
|
Enabled: false
|
478
|
-
|
479
|
-
|
480
|
-
|
123
|
+
|
124
|
+
Style/DoubleNegation:
|
125
|
+
Description: 'Checks for uses of double negation (!!).'
|
126
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
|
481
127
|
Enabled: false
|
482
|
-
|
483
|
-
|
484
|
-
|
128
|
+
|
129
|
+
Style/EachWithObject:
|
130
|
+
Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
|
485
131
|
Enabled: false
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
Style/BlockComments:
|
491
|
-
Description: Do not use block comments.
|
492
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
|
493
|
-
Enabled: true
|
494
|
-
Style/BlockDelimiters:
|
495
|
-
Description: Avoid using {...} for multi-line blocks (multiline chaining is always
|
496
|
-
ugly). Prefer {...} over do...end for single-line blocks.
|
497
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
498
|
-
Enabled: true
|
499
|
-
Style/CaseEquality:
|
500
|
-
Description: Avoid explicit use of the case equality operator(===).
|
501
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
|
132
|
+
|
133
|
+
Style/EmptyLiteral:
|
134
|
+
Description: 'Prefer literals to Array.new/Hash.new/String.new.'
|
135
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
|
502
136
|
Enabled: false
|
503
|
-
|
504
|
-
|
505
|
-
|
137
|
+
|
138
|
+
# Checks whether the source file has a utf-8 encoding comment or not
|
139
|
+
# AutoCorrectEncodingComment must match the regex
|
140
|
+
# /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
|
141
|
+
Style/Encoding:
|
506
142
|
Enabled: false
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
Style/ClassMethods:
|
512
|
-
Description: Use self when defining module/class methods.
|
513
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-singletons
|
514
|
-
Enabled: true
|
515
|
-
Style/ClassVars:
|
516
|
-
Description: Avoid the use of class variables.
|
517
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
|
143
|
+
|
144
|
+
Style/EvenOdd:
|
145
|
+
Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
|
146
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
518
147
|
Enabled: false
|
519
|
-
|
520
|
-
|
521
|
-
|
148
|
+
|
149
|
+
Naming/FileName:
|
150
|
+
Description: 'Use snake_case for source file names.'
|
151
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
|
522
152
|
Enabled: false
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
Description: Use def with parentheses when there are arguments.
|
529
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
530
|
-
Enabled: true
|
531
|
-
Style/Documentation:
|
532
|
-
Description: Document classes and non-namespace modules.
|
153
|
+
|
154
|
+
Style/FrozenStringLiteralComment:
|
155
|
+
Description: >-
|
156
|
+
Add the frozen_string_literal comment to the top of files
|
157
|
+
to help transition from Ruby 2.3.0 to Ruby 3.0.
|
533
158
|
Enabled: false
|
534
|
-
|
535
|
-
|
536
|
-
|
159
|
+
|
160
|
+
Style/FlipFlop:
|
161
|
+
Description: 'Checks for flip flops'
|
162
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
|
537
163
|
Enabled: false
|
538
|
-
|
539
|
-
|
164
|
+
|
165
|
+
Style/FormatString:
|
166
|
+
Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
|
167
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
|
540
168
|
Enabled: false
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
169
|
+
|
170
|
+
Style/GlobalVars:
|
171
|
+
Description: 'Do not introduce global variables.'
|
172
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
|
173
|
+
Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
|
547
174
|
Enabled: false
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
Style/EvenOdd:
|
553
|
-
Description: Favor the use of Fixnum#even? && Fixnum#odd?
|
554
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
175
|
+
|
176
|
+
Style/GuardClause:
|
177
|
+
Description: 'Check for conditionals that can be replaced with guard clauses'
|
178
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
555
179
|
Enabled: false
|
556
|
-
|
557
|
-
|
558
|
-
|
180
|
+
|
181
|
+
Style/IfUnlessModifier:
|
182
|
+
Description: >-
|
183
|
+
Favor modifier if/unless usage when you have a
|
184
|
+
single-line body.
|
185
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
|
559
186
|
Enabled: false
|
187
|
+
|
560
188
|
Style/IfWithSemicolon:
|
561
|
-
Description: Do not use if x; .... Use the ternary operator instead.
|
562
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
|
189
|
+
Description: 'Do not use if x; .... Use the ternary operator instead.'
|
190
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
|
563
191
|
Enabled: false
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
Enabled:
|
192
|
+
|
193
|
+
Style/InlineComment:
|
194
|
+
Description: 'Avoid inline comments.'
|
195
|
+
Enabled: false
|
196
|
+
|
568
197
|
Style/Lambda:
|
569
|
-
Description: Use the new lambda literal syntax for single-line blocks.
|
570
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
|
198
|
+
Description: 'Use the new lambda literal syntax for single-line blocks.'
|
199
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
|
200
|
+
Enabled: false
|
201
|
+
|
202
|
+
Style/LambdaCall:
|
203
|
+
Description: 'Use lambda.call(...) instead of lambda.(...).'
|
204
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
|
571
205
|
Enabled: false
|
206
|
+
|
572
207
|
Style/LineEndConcatenation:
|
573
|
-
Description:
|
574
|
-
|
208
|
+
Description: >-
|
209
|
+
Use \ instead of + or << to concatenate two string literals at
|
210
|
+
line end.
|
575
211
|
Enabled: false
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
212
|
+
|
213
|
+
Metrics/LineLength:
|
214
|
+
Description: 'Limit lines to 80 characters.'
|
215
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
|
216
|
+
Max: 80
|
217
|
+
|
218
|
+
Metrics/MethodLength:
|
219
|
+
Description: 'Avoid methods longer than 10 lines of code.'
|
220
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
|
221
|
+
Enabled: false
|
222
|
+
|
580
223
|
Style/ModuleFunction:
|
581
|
-
Description: Checks for usage of `extend self` in modules.
|
582
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
224
|
+
Description: 'Checks for usage of `extend self` in modules.'
|
225
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
|
583
226
|
Enabled: false
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
|
591
|
-
Enabled: true
|
227
|
+
|
228
|
+
Style/MultilineBlockChain:
|
229
|
+
Description: 'Avoid multi-line chains of blocks.'
|
230
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
|
231
|
+
Enabled: false
|
232
|
+
|
592
233
|
Style/NegatedIf:
|
593
|
-
Description:
|
594
|
-
|
234
|
+
Description: >-
|
235
|
+
Favor unless over if for negative conditions
|
236
|
+
(or control flow or).
|
237
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
|
595
238
|
Enabled: false
|
239
|
+
|
596
240
|
Style/NegatedWhile:
|
597
|
-
Description: Favor until over while for negative conditions.
|
598
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
|
241
|
+
Description: 'Favor until over while for negative conditions.'
|
242
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
|
599
243
|
Enabled: false
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
244
|
+
|
245
|
+
Style/Next:
|
246
|
+
Description: 'Use `next` to skip iteration instead of a condition at the end.'
|
247
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
248
|
+
Enabled: false
|
249
|
+
|
604
250
|
Style/NilComparison:
|
605
|
-
Description: Prefer x.nil? to x == nil.
|
606
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
251
|
+
Description: 'Prefer x.nil? to x == nil.'
|
252
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
607
253
|
Enabled: false
|
254
|
+
|
608
255
|
Style/Not:
|
609
|
-
Description: Use ! instead of not.
|
610
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
|
256
|
+
Description: 'Use ! instead of not.'
|
257
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
|
258
|
+
Enabled: false
|
259
|
+
|
260
|
+
Style/NumericLiterals:
|
261
|
+
Description: >-
|
262
|
+
Add underscores to large numeric literals to improve their
|
263
|
+
readability.
|
264
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
|
611
265
|
Enabled: false
|
266
|
+
|
612
267
|
Style/OneLineConditional:
|
613
|
-
Description:
|
614
|
-
|
268
|
+
Description: >-
|
269
|
+
Favor the ternary operator(?:) over
|
270
|
+
if/then/else/end constructs.
|
271
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
|
615
272
|
Enabled: false
|
616
|
-
|
617
|
-
|
618
|
-
|
273
|
+
|
274
|
+
Naming/BinaryOperatorParameterName:
|
275
|
+
Description: 'When defining binary operators, name the argument other.'
|
276
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
|
619
277
|
Enabled: false
|
620
|
-
|
621
|
-
|
622
|
-
|
278
|
+
|
279
|
+
Metrics/ParameterLists:
|
280
|
+
Description: 'Avoid parameter lists longer than three or four parameters.'
|
281
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
|
623
282
|
Enabled: false
|
624
|
-
|
625
|
-
|
626
|
-
|
283
|
+
|
284
|
+
Style/PercentLiteralDelimiters:
|
285
|
+
Description: 'Use `%`-literal delimiters consistently'
|
286
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
|
287
|
+
Enabled: false
|
288
|
+
|
289
|
+
Style/PerlBackrefs:
|
290
|
+
Description: 'Avoid Perl-style regex back references.'
|
291
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
|
627
292
|
Enabled: false
|
293
|
+
|
294
|
+
Naming/PredicateName:
|
295
|
+
Description: 'Check the names of predicate methods.'
|
296
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
|
297
|
+
NamePrefixBlacklist:
|
298
|
+
- is_
|
299
|
+
Exclude:
|
300
|
+
- spec/**/*
|
301
|
+
|
628
302
|
Style/Proc:
|
629
|
-
Description: Use proc instead of Proc.new.
|
630
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
|
303
|
+
Description: 'Use proc instead of Proc.new.'
|
304
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
|
631
305
|
Enabled: false
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
Enabled: true
|
644
|
-
Style/RescueModifier:
|
645
|
-
Description: Avoid using rescue in its modifier form.
|
646
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
|
647
|
-
Enabled: true
|
306
|
+
|
307
|
+
Style/RaiseArgs:
|
308
|
+
Description: 'Checks the arguments passed to raise/fail.'
|
309
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
|
310
|
+
Enabled: false
|
311
|
+
|
312
|
+
Style/RegexpLiteral:
|
313
|
+
Description: 'Use / or %r around regular expressions.'
|
314
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
|
315
|
+
Enabled: false
|
316
|
+
|
648
317
|
Style/SelfAssignment:
|
649
|
-
Description:
|
650
|
-
|
651
|
-
|
318
|
+
Description: >-
|
319
|
+
Checks for places where self-assignment shorthand should have
|
320
|
+
been used.
|
321
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
|
322
|
+
Enabled: false
|
323
|
+
|
324
|
+
Style/SingleLineBlockParams:
|
325
|
+
Description: 'Enforces the names of some block params.'
|
326
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
|
327
|
+
Enabled: false
|
328
|
+
|
329
|
+
Style/SingleLineMethods:
|
330
|
+
Description: 'Avoid single-line methods.'
|
331
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
|
332
|
+
Enabled: false
|
333
|
+
|
334
|
+
Style/SignalException:
|
335
|
+
Description: 'Checks for proper usage of fail and raise.'
|
336
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
|
652
337
|
Enabled: false
|
338
|
+
|
653
339
|
Style/SpecialGlobalVars:
|
654
|
-
Description: Avoid Perl-style global variables.
|
655
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
340
|
+
Description: 'Avoid Perl-style global variables.'
|
341
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
|
656
342
|
Enabled: false
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
Description: Do not use unless with else. Rewrite these with the positive case first.
|
663
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
|
664
|
-
Enabled: true
|
665
|
-
Style/UnneededCapitalW:
|
666
|
-
Description: Checks for %W when interpolation is not needed.
|
343
|
+
|
344
|
+
Style/StringLiterals:
|
345
|
+
Description: 'Checks if uses of quotes match the configured preference.'
|
346
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
|
347
|
+
EnforcedStyle: double_quotes
|
667
348
|
Enabled: true
|
668
|
-
|
669
|
-
|
670
|
-
|
349
|
+
|
350
|
+
Style/TrailingCommaInArguments:
|
351
|
+
Description: 'Checks for trailing comma in argument lists.'
|
352
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
353
|
+
EnforcedStyleForMultiline: comma
|
354
|
+
SupportedStylesForMultiline:
|
355
|
+
- comma
|
356
|
+
- consistent_comma
|
357
|
+
- no_comma
|
671
358
|
Enabled: true
|
672
|
-
|
673
|
-
|
674
|
-
|
359
|
+
|
360
|
+
Style/TrailingCommaInLiteral:
|
361
|
+
Description: 'Checks for trailing comma in array and hash literals.'
|
362
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
363
|
+
EnforcedStyleForMultiline: comma
|
364
|
+
SupportedStylesForMultiline:
|
365
|
+
- comma
|
366
|
+
- consistent_comma
|
367
|
+
- no_comma
|
675
368
|
Enabled: true
|
369
|
+
|
370
|
+
Style/TrivialAccessors:
|
371
|
+
Description: 'Prefer attr_* methods to trivial readers/writers.'
|
372
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
|
373
|
+
Enabled: false
|
374
|
+
|
676
375
|
Style/VariableInterpolation:
|
677
|
-
Description:
|
678
|
-
|
679
|
-
|
376
|
+
Description: >-
|
377
|
+
Don't interpolate global, instance and class variables
|
378
|
+
directly in strings.
|
379
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
|
680
380
|
Enabled: false
|
381
|
+
|
681
382
|
Style/WhenThen:
|
682
|
-
Description: Use when x then ... for one-line cases.
|
683
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
383
|
+
Description: 'Use when x then ... for one-line cases.'
|
384
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
|
684
385
|
Enabled: false
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
EnforcedHashRocketStyle: key
|
701
|
-
EnforcedColonStyle: key
|
702
|
-
EnforcedLastArgumentHashStyle: always_inspect
|
703
|
-
SupportedLastArgumentHashStyles:
|
704
|
-
- always_inspect
|
705
|
-
- always_ignore
|
706
|
-
- ignore_implicit
|
707
|
-
- ignore_explicit
|
386
|
+
|
387
|
+
Style/WhileUntilModifier:
|
388
|
+
Description: >-
|
389
|
+
Favor modifier while/until usage when you have a
|
390
|
+
single-line body.
|
391
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
|
392
|
+
Enabled: false
|
393
|
+
|
394
|
+
Style/WordArray:
|
395
|
+
Description: 'Use %w or %W for arrays of words.'
|
396
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
|
397
|
+
Enabled: false
|
398
|
+
|
399
|
+
# Layout
|
400
|
+
|
708
401
|
Layout/AlignParameters:
|
709
|
-
Description:
|
710
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
|
711
|
-
Enabled:
|
712
|
-
|
713
|
-
SupportedStyles:
|
714
|
-
- with_first_parameter
|
715
|
-
- with_fixed_indentation
|
716
|
-
Layout/CaseIndentation:
|
717
|
-
Description: Indentation of when in a case/when/[else/]end.
|
718
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
|
719
|
-
Enabled: true
|
720
|
-
EnforcedStyle: case
|
721
|
-
SupportedStyles:
|
722
|
-
- case
|
723
|
-
- end
|
724
|
-
IndentOneStep: false
|
725
|
-
Layout/CommentIndentation:
|
726
|
-
Description: Indentation of comments.
|
727
|
-
Enabled: true
|
402
|
+
Description: 'Here we check if the parameters on a multi-line method call or definition are aligned.'
|
403
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
|
404
|
+
Enabled: false
|
405
|
+
|
728
406
|
Layout/DotPosition:
|
729
|
-
Description: Checks the position of the dot in multi-line method calls.
|
730
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
731
|
-
Enabled: true
|
407
|
+
Description: 'Checks the position of the dot in multi-line method calls.'
|
408
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
|
732
409
|
EnforcedStyle: trailing
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
Layout/EmptyLineBetweenDefs:
|
737
|
-
Description: Use empty lines between defs.
|
738
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
|
739
|
-
Enabled: true
|
740
|
-
AllowAdjacentOneLineDefs: false
|
741
|
-
Layout/EmptyLinesAroundBlockBody:
|
742
|
-
Description: Keeps track of empty lines around block bodies.
|
743
|
-
Enabled: true
|
744
|
-
EnforcedStyle: no_empty_lines
|
745
|
-
SupportedStyles:
|
746
|
-
- empty_lines
|
747
|
-
- no_empty_lines
|
748
|
-
Layout/EmptyLinesAroundClassBody:
|
749
|
-
Description: Keeps track of empty lines around class bodies.
|
750
|
-
Enabled: true
|
751
|
-
EnforcedStyle: no_empty_lines
|
752
|
-
SupportedStyles:
|
753
|
-
- empty_lines
|
754
|
-
- no_empty_lines
|
755
|
-
Layout/EmptyLinesAroundModuleBody:
|
756
|
-
Description: Keeps track of empty lines around module bodies.
|
757
|
-
Enabled: true
|
758
|
-
EnforcedStyle: no_empty_lines
|
759
|
-
SupportedStyles:
|
760
|
-
- empty_lines
|
761
|
-
- no_empty_lines
|
762
|
-
Layout/FirstParameterIndentation:
|
763
|
-
Description: Checks the indentation of the first parameter in a method call.
|
764
|
-
Enabled: true
|
765
|
-
EnforcedStyle: special_for_inner_method_call_in_parentheses
|
766
|
-
SupportedStyles:
|
767
|
-
- consistent
|
768
|
-
- special_for_inner_method_call
|
769
|
-
- special_for_inner_method_call_in_parentheses
|
770
|
-
Layout/IndentationWidth:
|
771
|
-
Description: Use 2 spaces for indentation.
|
772
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
773
|
-
Enabled: true
|
774
|
-
Width: 2
|
775
|
-
Layout/IndentHash:
|
776
|
-
Description: Checks the indentation of the first key in a hash literal.
|
777
|
-
Enabled: true
|
778
|
-
EnforcedStyle: special_inside_parentheses
|
779
|
-
SupportedStyles:
|
780
|
-
- special_inside_parentheses
|
781
|
-
- consistent
|
782
|
-
Layout/MultilineMethodCallIndentation:
|
783
|
-
Description: Checks indentation of method calls with the dot operator
|
784
|
-
that span more than one line.
|
410
|
+
|
411
|
+
Layout/ExtraSpacing:
|
412
|
+
Description: 'Do not use unnecessary spacing.'
|
785
413
|
Enabled: true
|
786
|
-
|
787
|
-
SupportedStyles:
|
788
|
-
- aligned
|
789
|
-
- indented
|
414
|
+
|
790
415
|
Layout/MultilineOperationIndentation:
|
791
|
-
Description:
|
416
|
+
Description: >-
|
417
|
+
Checks indentation of binary operations that span more than
|
418
|
+
one line.
|
792
419
|
Enabled: true
|
793
420
|
EnforcedStyle: indented
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
Enabled: true
|
800
|
-
EnforcedStyleInsidePipes: no_space
|
801
|
-
SupportedStylesInsidePipes:
|
802
|
-
- space
|
803
|
-
- no_space
|
804
|
-
Layout/SpaceAroundEqualsInParameterDefault:
|
805
|
-
Description: Checks that the equals signs in parameter default assignments have
|
806
|
-
or don't have surrounding space depending on configuration.
|
807
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
|
808
|
-
Enabled: true
|
809
|
-
EnforcedStyle: space
|
810
|
-
SupportedStyles:
|
811
|
-
- space
|
812
|
-
- no_space
|
813
|
-
Layout/SpaceBeforeBlockBraces:
|
814
|
-
Description: Checks that the left block brace has or doesn't have space before it.
|
815
|
-
Enabled: true
|
816
|
-
EnforcedStyle: space
|
817
|
-
SupportedStyles:
|
818
|
-
- space
|
819
|
-
- no_space
|
820
|
-
Layout/SpaceBeforeFirstArg:
|
821
|
-
Description: Put a space between a method name and the first argument in a method
|
822
|
-
call without parentheses.
|
823
|
-
Enabled: true
|
824
|
-
Layout/SpaceInsideBlockBraces:
|
825
|
-
Description: Checks that block braces have or don't have surrounding space. For
|
826
|
-
blocks taking parameters, checks that the left brace has or doesn't have trailing
|
827
|
-
space.
|
828
|
-
Enabled: true
|
829
|
-
EnforcedStyle: space
|
830
|
-
SupportedStyles:
|
831
|
-
- space
|
832
|
-
- no_space
|
833
|
-
EnforcedStyleForEmptyBraces: no_space
|
834
|
-
SpaceBeforeBlockParameters: true
|
835
|
-
Layout/SpaceInsideHashLiteralBraces:
|
836
|
-
Description: Use spaces inside hash literal braces - or don't.
|
837
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
838
|
-
Enabled: true
|
839
|
-
EnforcedStyle: space
|
840
|
-
EnforcedStyleForEmptyBraces: no_space
|
841
|
-
SupportedStyles:
|
842
|
-
- space
|
843
|
-
- no_space
|
844
|
-
Layout/TrailingBlankLines:
|
845
|
-
Description: Checks trailing blank lines and final newline.
|
846
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
|
847
|
-
Enabled: true
|
848
|
-
EnforcedStyle: final_newline
|
849
|
-
SupportedStyles:
|
850
|
-
- final_newline
|
851
|
-
- final_blank_line
|
852
|
-
Layout/ExtraSpacing:
|
853
|
-
Description: Do not use unnecessary spacing.
|
854
|
-
Enabled: true
|
855
|
-
Layout/AlignArray:
|
856
|
-
Description: Align the elements of an array literal if they span more than one line.
|
857
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
|
858
|
-
Enabled: true
|
859
|
-
Layout/BlockEndNewline:
|
860
|
-
Description: Put end statement of multiline block on its own line.
|
861
|
-
Enabled: true
|
862
|
-
Layout/CommentIndentation:
|
863
|
-
Description: Indentation of comments.
|
864
|
-
Enabled: true
|
865
|
-
Layout/ElseAlignment:
|
866
|
-
Description: Align elses and elsifs correctly.
|
867
|
-
Enabled: true
|
868
|
-
Layout/EmptyLines:
|
869
|
-
Description: Don't use several empty lines in a row.
|
870
|
-
Enabled: true
|
871
|
-
Layout/EmptyLinesAroundAccessModifier:
|
872
|
-
Description: Keep blank lines around access modifiers.
|
873
|
-
Enabled: true
|
874
|
-
Layout/EmptyLinesAroundMethodBody:
|
875
|
-
Description: Keeps track of empty lines around method bodies.
|
876
|
-
Enabled: true
|
877
|
-
Layout/EndOfLine:
|
878
|
-
Description: Use Unix-style line endings.
|
879
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
|
880
|
-
Enabled: true
|
881
|
-
Layout/IndentationConsistency:
|
882
|
-
Description: Keep indentation straight.
|
883
|
-
Enabled: true
|
884
|
-
Layout/IndentArray:
|
885
|
-
Description: Checks the indentation of the first element in an array literal.
|
886
|
-
Enabled: true
|
887
|
-
Layout/LeadingCommentSpace:
|
888
|
-
Description: Comments should start with a space.
|
889
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
|
890
|
-
Enabled: true
|
891
|
-
Layout/MultilineBlockLayout:
|
892
|
-
Description: Ensures newlines after multiline block do statements.
|
893
|
-
Enabled: true
|
894
|
-
Layout/SpaceBeforeFirstArg:
|
895
|
-
Description: Checks that exactly one space is used between a method name and the
|
896
|
-
first argument for method calls without parentheses.
|
897
|
-
Enabled: true
|
898
|
-
Layout/SpaceAfterColon:
|
899
|
-
Description: Use spaces after colons.
|
900
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
901
|
-
Enabled: true
|
902
|
-
Layout/SpaceAfterComma:
|
903
|
-
Description: Use spaces after commas.
|
904
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
905
|
-
Enabled: true
|
906
|
-
Layout/SpaceAroundKeyword:
|
907
|
-
Description: Use spaces after if/elsif/unless/while/until/case/when.
|
908
|
-
Enabled: true
|
909
|
-
Layout/SpaceAfterMethodName:
|
910
|
-
Description: Do not put a space between a method name and the opening parenthesis
|
911
|
-
in a method definition.
|
912
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
913
|
-
Enabled: true
|
914
|
-
Layout/SpaceAfterNot:
|
915
|
-
Description: Tracks redundant space after the ! operator.
|
916
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
|
917
|
-
Enabled: true
|
918
|
-
Layout/SpaceAfterSemicolon:
|
919
|
-
Description: Use spaces after semicolons.
|
920
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
921
|
-
Enabled: true
|
922
|
-
Layout/SpaceBeforeComma:
|
923
|
-
Description: No spaces before commas.
|
924
|
-
Enabled: true
|
925
|
-
Layout/SpaceBeforeComment:
|
926
|
-
Description: Checks for missing space between code and a comment on the same line.
|
927
|
-
Enabled: true
|
928
|
-
Layout/SpaceBeforeSemicolon:
|
929
|
-
Description: No spaces before semicolons.
|
930
|
-
Enabled: true
|
931
|
-
Layout/SpaceAroundOperators:
|
932
|
-
Description: Use spaces around operators.
|
933
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
934
|
-
Enabled: true
|
935
|
-
Layout/SpaceAroundKeyword:
|
936
|
-
Description: Put a space before the modifier keyword.
|
937
|
-
Enabled: true
|
938
|
-
Layout/SpaceInsideBrackets:
|
939
|
-
Description: No spaces after [ or before ].
|
940
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
941
|
-
Enabled: true
|
942
|
-
Layout/SpaceInsideParens:
|
943
|
-
Description: No spaces after ( or before ).
|
944
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
945
|
-
Enabled: true
|
946
|
-
Layout/SpaceInsideRangeLiteral:
|
947
|
-
Description: No spaces inside range literals.
|
948
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
|
949
|
-
Enabled: true
|
950
|
-
Layout/Tab:
|
951
|
-
Description: No hard tabs.
|
952
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
953
|
-
Enabled: true
|
954
|
-
Layout/TrailingWhitespace:
|
955
|
-
Description: Avoid trailing whitespace.
|
956
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
|
421
|
+
|
422
|
+
Layout/MultilineMethodCallIndentation:
|
423
|
+
Description: >-
|
424
|
+
Checks indentation of method calls with the dot operator
|
425
|
+
that span more than one line.
|
957
426
|
Enabled: true
|
427
|
+
EnforcedStyle: indented
|
428
|
+
|
429
|
+
Layout/InitialIndentation:
|
430
|
+
Description: >-
|
431
|
+
Checks the indentation of the first non-blank non-comment line in a file.
|
432
|
+
Enabled: false
|
433
|
+
|
434
|
+
# Lint
|
435
|
+
|
958
436
|
Lint/AmbiguousOperator:
|
959
|
-
Description:
|
960
|
-
|
961
|
-
|
437
|
+
Description: >-
|
438
|
+
Checks for ambiguous operators in the first argument of a
|
439
|
+
method invocation without parentheses.
|
440
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
|
962
441
|
Enabled: false
|
442
|
+
|
963
443
|
Lint/AmbiguousRegexpLiteral:
|
964
|
-
Description:
|
965
|
-
|
444
|
+
Description: >-
|
445
|
+
Checks for ambiguous regexp literals in the first argument of
|
446
|
+
a method invocation without parenthesis.
|
966
447
|
Enabled: false
|
967
|
-
|
968
|
-
|
969
|
-
|
448
|
+
|
449
|
+
Lint/AssignmentInCondition:
|
450
|
+
Description: "Don't use assignment in conditions."
|
451
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
|
452
|
+
Enabled: false
|
453
|
+
|
454
|
+
Lint/CircularArgumentReference:
|
455
|
+
Description: "Don't refer to the keyword argument in the default value."
|
456
|
+
Enabled: false
|
457
|
+
|
970
458
|
Lint/ConditionPosition:
|
971
|
-
Description:
|
972
|
-
|
973
|
-
|
459
|
+
Description: >-
|
460
|
+
Checks for condition placed in a confusing position relative to
|
461
|
+
the keyword.
|
462
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
|
974
463
|
Enabled: false
|
975
|
-
|
976
|
-
Description: Check for debugger calls.
|
977
|
-
Enabled: true
|
464
|
+
|
978
465
|
Lint/DeprecatedClassMethods:
|
979
|
-
Description: Check for deprecated class method calls.
|
466
|
+
Description: 'Check for deprecated class method calls.'
|
980
467
|
Enabled: false
|
981
|
-
|
982
|
-
|
983
|
-
|
468
|
+
|
469
|
+
Lint/DuplicatedKey:
|
470
|
+
Description: 'Check for duplicate keys in hash literals.'
|
471
|
+
Enabled: false
|
472
|
+
|
473
|
+
Lint/EachWithObjectArgument:
|
474
|
+
Description: 'Check for immutable argument given to each_with_object.'
|
475
|
+
Enabled: false
|
476
|
+
|
984
477
|
Lint/ElseLayout:
|
985
|
-
Description: Check for odd code arrangement in an else block.
|
478
|
+
Description: 'Check for odd code arrangement in an else block.'
|
986
479
|
Enabled: false
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
Lint/EmptyInterpolation:
|
991
|
-
Description: Checks for empty string interpolation.
|
992
|
-
Enabled: true
|
993
|
-
Lint/EndInMethod:
|
994
|
-
Description: END blocks should not be placed inside method definitions.
|
995
|
-
Enabled: true
|
996
|
-
Lint/EnsureReturn:
|
997
|
-
Description: Do not use return in an ensure block.
|
998
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
|
999
|
-
Enabled: true
|
1000
|
-
Lint/HandleExceptions:
|
1001
|
-
Description: Don't suppress exception.
|
1002
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
480
|
+
|
481
|
+
Lint/FormatParameterMismatch:
|
482
|
+
Description: 'The number of parameters to format/sprint must match the fields.'
|
1003
483
|
Enabled: false
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
484
|
+
|
485
|
+
Lint/HandleExceptions:
|
486
|
+
Description: "Don't suppress exception."
|
487
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
|
1007
488
|
Enabled: false
|
489
|
+
|
1008
490
|
Lint/LiteralInCondition:
|
1009
|
-
Description: Checks of literals used in conditions.
|
491
|
+
Description: 'Checks of literals used in conditions.'
|
1010
492
|
Enabled: false
|
493
|
+
|
1011
494
|
Lint/LiteralInInterpolation:
|
1012
|
-
Description: Checks for literals used in interpolation.
|
495
|
+
Description: 'Checks for literals used in interpolation.'
|
1013
496
|
Enabled: false
|
497
|
+
|
1014
498
|
Lint/Loop:
|
1015
|
-
Description:
|
1016
|
-
|
1017
|
-
|
499
|
+
Description: >-
|
500
|
+
Use Kernel#loop with break rather than begin/end/until or
|
501
|
+
begin/end/while for post-loop tests.
|
502
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
|
503
|
+
Enabled: false
|
504
|
+
|
505
|
+
Lint/NestedMethodDefinition:
|
506
|
+
Description: 'Do not use nested method definitions.'
|
507
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
|
1018
508
|
Enabled: false
|
509
|
+
|
510
|
+
Lint/NonLocalExitFromIterator:
|
511
|
+
Description: 'Do not use return in iterator to cause non-local exit.'
|
512
|
+
Enabled: false
|
513
|
+
|
1019
514
|
Lint/ParenthesesAsGroupedExpression:
|
1020
|
-
Description:
|
1021
|
-
|
515
|
+
Description: >-
|
516
|
+
Checks for method calls with a space before the opening
|
517
|
+
parenthesis.
|
518
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
1022
519
|
Enabled: false
|
520
|
+
|
1023
521
|
Lint/RequireParentheses:
|
1024
|
-
Description:
|
522
|
+
Description: >-
|
523
|
+
Use parentheses in the method call to avoid confusion
|
524
|
+
about precedence.
|
1025
525
|
Enabled: false
|
1026
|
-
|
1027
|
-
Description: Avoid rescuing the Exception class.
|
1028
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
|
1029
|
-
Enabled: true
|
1030
|
-
Lint/ShadowingOuterLocalVariable:
|
1031
|
-
Description: Do not use the same name as outer local variable for block arguments
|
1032
|
-
or block local variables.
|
1033
|
-
Enabled: true
|
1034
|
-
Lint/StringConversionInInterpolation:
|
1035
|
-
Description: Checks for Object#to_s usage in string interpolation.
|
1036
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
|
1037
|
-
Enabled: true
|
526
|
+
|
1038
527
|
Lint/UnderscorePrefixedVariableName:
|
1039
|
-
Description: Do not use prefix `_` for a variable that is used.
|
528
|
+
Description: 'Do not use prefix `_` for a variable that is used.'
|
1040
529
|
Enabled: false
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
Lint/UnreachableCode:
|
1050
|
-
Description: Unreachable code.
|
1051
|
-
Enabled: true
|
1052
|
-
Lint/UselessAccessModifier:
|
1053
|
-
Description: Checks for useless access modifiers.
|
1054
|
-
Enabled: true
|
1055
|
-
Lint/UselessAssignment:
|
1056
|
-
Description: Checks for useless assignment to a local variable.
|
1057
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
1058
|
-
Enabled: true
|
1059
|
-
Lint/UselessComparison:
|
1060
|
-
Description: Checks for comparison of something with itself.
|
1061
|
-
Enabled: true
|
1062
|
-
Lint/UselessElseWithoutRescue:
|
1063
|
-
Description: Checks for useless `else` in `begin..end` without `rescue`.
|
1064
|
-
Enabled: true
|
1065
|
-
Lint/UselessSetterCall:
|
1066
|
-
Description: Checks for useless setter call to a local variable.
|
1067
|
-
Enabled: true
|
530
|
+
|
531
|
+
Lint/UnneededDisable:
|
532
|
+
Description: >-
|
533
|
+
Checks for rubocop:disable comments that can be removed.
|
534
|
+
Note: this cop is not disabled when disabling all cops.
|
535
|
+
It must be explicitly disabled.
|
536
|
+
Enabled: false
|
537
|
+
|
1068
538
|
Lint/Void:
|
1069
|
-
Description: Possible use of operator/literal/variable in void context.
|
539
|
+
Description: 'Possible use of operator/literal/variable in void context.'
|
1070
540
|
Enabled: false
|
1071
|
-
|
1072
|
-
|
541
|
+
|
542
|
+
# Performance
|
543
|
+
|
544
|
+
Performance/CaseWhenSplat:
|
545
|
+
Description: >-
|
546
|
+
Place `when` conditions that use splat at the end
|
547
|
+
of the list of `when` branches.
|
548
|
+
Enabled: false
|
549
|
+
|
550
|
+
Performance/Count:
|
551
|
+
Description: >-
|
552
|
+
Use `count` instead of `select...size`, `reject...size`,
|
553
|
+
`select...count`, `reject...count`, `select...length`,
|
554
|
+
and `reject...length`.
|
555
|
+
Enabled: false
|
556
|
+
|
557
|
+
Performance/Detect:
|
558
|
+
Description: >-
|
559
|
+
Use `detect` instead of `select.first`, `find_all.first`,
|
560
|
+
`select.last`, and `find_all.last`.
|
561
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
|
562
|
+
Enabled: false
|
563
|
+
|
564
|
+
Performance/FlatMap:
|
565
|
+
Description: >-
|
566
|
+
Use `Enumerable#flat_map`
|
567
|
+
instead of `Enumerable#map...Array#flatten(1)`
|
568
|
+
or `Enumberable#collect..Array#flatten(1)`
|
569
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
|
570
|
+
Enabled: false
|
571
|
+
|
572
|
+
Performance/ReverseEach:
|
573
|
+
Description: 'Use `reverse_each` instead of `reverse.each`.'
|
574
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
|
575
|
+
Enabled: false
|
576
|
+
|
577
|
+
Performance/Sample:
|
578
|
+
Description: >-
|
579
|
+
Use `sample` instead of `shuffle.first`,
|
580
|
+
`shuffle.last`, and `shuffle[Fixnum]`.
|
581
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
|
582
|
+
Enabled: false
|
583
|
+
|
584
|
+
Performance/Size:
|
585
|
+
Description: >-
|
586
|
+
Use `size` instead of `count` for counting
|
587
|
+
the number of elements in `Array` and `Hash`.
|
588
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
|
589
|
+
Enabled: false
|
590
|
+
|
591
|
+
Performance/StringReplacement:
|
592
|
+
Description: >-
|
593
|
+
Use `tr` instead of `gsub` when you are replacing the same
|
594
|
+
number of characters. Use `delete` instead of `gsub` when
|
595
|
+
you are deleting characters.
|
596
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
|
597
|
+
Enabled: false
|
598
|
+
|
599
|
+
# Rails
|
600
|
+
|
601
|
+
Rails/ActionFilter:
|
602
|
+
Description: 'Enforces consistent use of action filter methods.'
|
603
|
+
Enabled: false
|
604
|
+
|
605
|
+
Rails/Date:
|
606
|
+
Description: >-
|
607
|
+
Checks the correct usage of date aware methods,
|
608
|
+
such as Date.today, Date.current etc.
|
609
|
+
Enabled: false
|
610
|
+
|
611
|
+
Rails/FindBy:
|
612
|
+
Description: 'Prefer find_by over where.first.'
|
613
|
+
Enabled: false
|
614
|
+
|
615
|
+
Rails/FindEach:
|
616
|
+
Description: 'Prefer all.find_each over all.find.'
|
617
|
+
Enabled: false
|
618
|
+
|
619
|
+
Rails/HasAndBelongsToMany:
|
620
|
+
Description: 'Prefer has_many :through to has_and_belongs_to_many.'
|
621
|
+
Enabled: false
|
622
|
+
|
623
|
+
Rails/Output:
|
624
|
+
Description: 'Checks for calls to puts, print, etc.'
|
625
|
+
Enabled: false
|
626
|
+
|
627
|
+
Rails/ReadWriteAttribute:
|
628
|
+
Description: >-
|
629
|
+
Checks for read_attribute(:attr) and
|
630
|
+
write_attribute(:attr, val).
|
631
|
+
Enabled: false
|
632
|
+
|
633
|
+
Rails/ScopeArgs:
|
634
|
+
Description: 'Checks the arguments of ActiveRecord scopes.'
|
635
|
+
Enabled: false
|
636
|
+
|
637
|
+
Rails/TimeZone:
|
638
|
+
Description: 'Checks the correct usage of time zone aware methods.'
|
639
|
+
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
|
640
|
+
Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
|
641
|
+
Enabled: false
|
642
|
+
|
643
|
+
Rails/Validation:
|
644
|
+
Description: 'Use validates :attribute, hash of validations.'
|
1073
645
|
Enabled: false
|
1074
|
-
Security/Eval:
|
1075
|
-
Description: The use of eval represents a serious security risk.
|
1076
|
-
Enabled: true
|