vedeu 0.6.15 → 0.6.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +2 -60
  3. data/config/rubocop_enabled.yml +6 -1023
  4. data/docs/events/refresh.md +6 -2
  5. data/docs/events/visibility.md +8 -3
  6. data/lib/vedeu.rb +4 -3
  7. data/lib/vedeu/all.rb +3 -2
  8. data/lib/vedeu/api/external.rb +6 -6
  9. data/lib/vedeu/bindings/bindings.rb +3 -3
  10. data/lib/vedeu/bindings/movement.rb +4 -4
  11. data/lib/vedeu/bindings/refresh.rb +9 -9
  12. data/lib/vedeu/bindings/visibility.rb +10 -12
  13. data/lib/vedeu/buffers/buffer.rb +1 -1
  14. data/lib/vedeu/buffers/refresh.rb +1 -1
  15. data/lib/vedeu/colours/repository.rb +1 -0
  16. data/lib/vedeu/colours/translator.rb +2 -6
  17. data/lib/vedeu/common.rb +2 -1
  18. data/lib/vedeu/configuration/api.rb +16 -7
  19. data/lib/vedeu/cursors/cursor.rb +12 -21
  20. data/lib/vedeu/cursors/refresh.rb +1 -1
  21. data/lib/vedeu/dsl/text.rb +21 -18
  22. data/lib/vedeu/dsl/use.rb +13 -11
  23. data/lib/vedeu/dsl/view.rb +52 -46
  24. data/lib/vedeu/editor/cursor.rb +2 -2
  25. data/lib/vedeu/editor/insert.rb +2 -6
  26. data/lib/vedeu/editor/line.rb +3 -8
  27. data/lib/vedeu/editor/lines.rb +1 -12
  28. data/lib/vedeu/events/event.rb +52 -43
  29. data/lib/vedeu/events/trigger.rb +7 -15
  30. data/lib/vedeu/geometry/generic_coordinate.rb +4 -12
  31. data/lib/vedeu/geometry/geometry.rb +1 -1
  32. data/lib/vedeu/input/translator.rb +50 -31
  33. data/lib/vedeu/models/focus.rb +33 -22
  34. data/lib/vedeu/models/group.rb +8 -7
  35. data/lib/vedeu/models/interface.rb +6 -10
  36. data/lib/vedeu/models/toggleable.rb +6 -9
  37. data/lib/vedeu/models/views/char.rb +24 -30
  38. data/lib/vedeu/models/views/html_char.rb +0 -33
  39. data/lib/vedeu/models/views/stream.rb +8 -7
  40. data/lib/vedeu/models/views/view.rb +9 -9
  41. data/lib/vedeu/options.rb +1 -1
  42. data/lib/vedeu/output/clear/all.rb +13 -0
  43. data/lib/vedeu/output/clear/{named_group.rb → group.rb} +4 -7
  44. data/lib/vedeu/output/clear/{named_interface.rb → interface.rb} +4 -7
  45. data/lib/vedeu/output/direct.rb +2 -2
  46. data/lib/vedeu/output/presentation/presentation.rb +10 -7
  47. data/lib/vedeu/output/renderers/all.rb +9 -4
  48. data/lib/vedeu/output/renderers/escape_sequence.rb +1 -1
  49. data/lib/vedeu/output/renderers/file.rb +1 -1
  50. data/lib/vedeu/output/renderers/null.rb +1 -1
  51. data/lib/vedeu/output/renderers/{renderer_options.rb → options.rb} +2 -2
  52. data/lib/vedeu/output/renderers/terminal.rb +1 -1
  53. data/lib/vedeu/output/renderers/text.rb +1 -1
  54. data/lib/vedeu/output/text.rb +4 -8
  55. data/lib/vedeu/output/viewport.rb +2 -6
  56. data/lib/vedeu/output/wordwrap.rb +2 -6
  57. data/lib/vedeu/repositories/repository.rb +9 -22
  58. data/lib/vedeu/runtime/application.rb +2 -6
  59. data/lib/vedeu/templating/view_template.rb +7 -15
  60. data/lib/vedeu/version.rb +1 -1
  61. data/test/lib/vedeu/bindings/bindings_test.rb +32 -6
  62. data/test/lib/vedeu/bindings/refresh_test.rb +1 -0
  63. data/test/lib/vedeu/bindings/visibility_test.rb +1 -0
  64. data/test/lib/vedeu/buffers/buffer_test.rb +2 -2
  65. data/test/lib/vedeu/colours/background_test.rb +0 -18
  66. data/test/lib/vedeu/colours/foreground_test.rb +0 -18
  67. data/test/lib/vedeu/cursors/refresh_test.rb +5 -3
  68. data/test/lib/vedeu/events/aliases_test.rb +0 -6
  69. data/test/lib/vedeu/models/views/view_test.rb +1 -1
  70. data/test/lib/vedeu/output/clear/{named_group_test.rb → group_test.rb} +5 -5
  71. data/test/lib/vedeu/output/clear/{named_interface_test.rb → interface_test.rb} +4 -4
  72. data/test/lib/vedeu/output/renderers/{renderer_options_test.rb → options_test.rb} +2 -2
  73. data/vedeu.gemspec +1 -1
  74. metadata +14 -14
  75. data/config/rubocop_disabled.yml +0 -50
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7229836cd42c82c006486c2f7ed0022ec046d221
4
- data.tar.gz: 1ae9b7c3569417d567f5f0efef7ad3122ed4002f
3
+ metadata.gz: 9013b07b7255d5eb249cca53f35155a08826eda5
4
+ data.tar.gz: 106b0dfa3ff9f754d3e38408914b0198e110e15d
5
5
  SHA512:
6
- metadata.gz: 55f86239b851af40caea7a418f4c6d540a1646d9cf716334e36ee4efc01076af59cdc866a44524f09b98be3cad760ca00c0a410dd34a9b839651a964f803ecb8
7
- data.tar.gz: 3b75c1b0e8e30de1ce8ea0d41b0aeee735b193a22aa2c53a73a2b8e214a06efe84a83ecf9385a31a896ad8958471700049cca651f9c35fa9b8990677e333fce4
6
+ metadata.gz: bc62cbdcc1109ebadae16b6a8f104530405102d90b80ac501756b4613abc62d8420d9bdb15c8494da54f212a0d1d49fd96dadf38ef66b2e730eace400dd2d11c
7
+ data.tar.gz: d151dc091e3d29dad7d30e43a86e05a51f5d5662a1b1d6c23d6e81e405f08658b44a6bb750baf4d36cee2723f37515834734534dec4a3bf1403cd7976c3a55b7
data/.rubocop.yml CHANGED
@@ -1,9 +1,5 @@
1
- # This is the default configuration file. Enabling and disabling is configured
2
- # in separate files. This file adds all other parameters apart from Enabled.
3
-
4
1
  inherit_from:
5
2
  - config/rubocop_enabled.yml
6
- - config/rubocop_disabled.yml
7
3
 
8
4
  # Common configuration.
9
5
  AllCops:
@@ -96,9 +92,6 @@ Style/Next:
96
92
  - skip_modifier_ifs
97
93
  - always
98
94
 
99
- Style/SpaceAroundOperators:
100
- Enabled: false
101
-
102
95
  Style/SpaceAroundEqualsInParameterDefault:
103
96
  EnforcedStyle: space
104
97
 
@@ -117,8 +110,6 @@ Style/TrailingBlankLines:
117
110
  Style/TrailingComma:
118
111
  EnforcedStyleForMultiline: comma
119
112
 
120
- ##################### Metrics ##################################
121
-
122
113
  Metrics/AbcSize:
123
114
  # The ABC size is a calculated magnitude, so this number can be a Fixnum or
124
115
  # a Float.
@@ -127,62 +118,13 @@ Metrics/AbcSize:
127
118
  Metrics/BlockNesting:
128
119
  Max: 3
129
120
 
130
- Metrics/ClassLength:
131
- CountComments: false # count full line comments?
132
- Max: 100
133
-
134
121
  # Avoid complex methods.
135
122
  Metrics/CyclomaticComplexity:
136
123
  Max: 12
137
124
 
138
- Metrics/LineLength:
139
- Max: 80
140
- # To make it possible to copy or click on URIs in the code, we allow lines
141
- # contaning a URI to be longer than Max.
142
- AllowURI: true
143
- URISchemes:
144
- - http
145
- - https
146
-
147
125
  Metrics/MethodLength:
148
126
  CountComments: false # count full line comments?
149
- Max: 70
150
-
151
- Metrics/ParameterLists:
152
- Max: 5
153
- CountKeywordArgs: true
127
+ Max: 30
154
128
 
155
129
  Metrics/PerceivedComplexity:
156
- Max: 12
157
-
158
- ##################### Lint ##################################
159
-
160
- # Allow safe assignment in conditions.
161
- Lint/AssignmentInCondition:
162
- AllowSafeAssignment: true
163
-
164
- # Align ends correctly.
165
- Lint/EndAlignment:
166
- # The value `keyword` means that `end` should be aligned with the matching
167
- # keyword (if, while, etc.).
168
- # The value `variable` means that in assignments, `end` should be aligned
169
- # with the start of the variable on the left hand side of `=`. In all other
170
- # situations, `end` should still be aligned with the keyword.
171
- AlignWith: keyword
172
- SupportedStyles:
173
- - keyword
174
- - variable
175
-
176
- Lint/DefEndAlignment:
177
- # The value `def` means that `end` should be aligned with the def keyword.
178
- # The value `start_of_line` means that `end` should be aligned with method
179
- # calls like `private`, `public`, etc, if present in front of the `def`
180
- # keyword on the same line.
181
- AlignWith: start_of_line
182
- SupportedStyles:
183
- - start_of_line
184
- - def
185
-
186
- Lint/Eval:
187
- Description: 'The use of eval represents a serious security risk.'
188
- Enabled: false
130
+ Max: 10
@@ -1,1039 +1,22 @@
1
- # These are all the cops that are enabled in the default configuration.
2
-
3
- Style/AccessModifierIndentation:
4
- Description: Check indentation of private/protected visibility modifiers.
5
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
6
- Enabled: true
7
-
8
- Style/AccessorMethodName:
9
- Description: Check the naming of accessor methods for get_/set_.
10
- Enabled: true
11
-
12
- Style/Alias:
13
- Description: 'Use alias_method instead of alias.'
14
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
15
- Enabled: true
16
-
17
- Style/AlignArray:
18
- Description: >-
19
- Align the elements of an array literal if they span more than
20
- one line.
21
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
22
- Enabled: true
23
-
24
- Style/AlignHash:
25
- Description: >-
26
- Align the elements of a hash literal if they span more than
27
- one line.
28
- Enabled: true
29
-
30
- Style/AlignParameters:
31
- Description: >-
32
- Align the parameters of a method call if they span more
33
- than one line.
34
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
35
- Enabled: true
36
-
37
- Style/AndOr:
38
- Description: 'Use &&/|| instead of and/or.'
39
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
40
- Enabled: true
1
+ Lint/Eval:
2
+ Description: 'The use of eval represents a serious security risk.'
3
+ Enabled: false
41
4
 
42
- Style/ArrayJoin:
43
- Description: 'Use Array#join instead of Array#*.'
44
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
45
- Enabled: true
5
+ Metrics/ClassLength:
6
+ Description: 'Avoid classes longer than 100 lines of code.'
7
+ Enabled: false
46
8
 
47
9
  Style/AsciiComments:
48
10
  Description: 'Use only ascii symbols in comments.'
49
11
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
50
12
  Enabled: false
51
13
 
52
- Style/AsciiIdentifiers:
53
- Description: 'Use only ascii symbols in identifiers.'
54
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
55
- Enabled: true
56
-
57
- Style/Attr:
58
- Description: 'Checks for uses of Module#attr.'
59
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
60
- Enabled: true
61
-
62
- Style/BeginBlock:
63
- Description: 'Avoid the use of BEGIN blocks.'
64
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
65
- Enabled: true
66
-
67
- Style/BarePercentLiterals:
68
- Description: 'Checks if usage of %() or %Q() matches configuration.'
69
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
70
- Enabled: true
71
-
72
- Style/BlockComments:
73
- Description: 'Do not use block comments.'
74
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
75
- Enabled: true
76
-
77
- Style/BlockDelimiters:
78
- Enabled: false
79
-
80
- Style/BlockEndNewline:
81
- Description: 'Put end statement of multiline block on its own line.'
82
- Enabled: true
83
-
84
- Style/BracesAroundHashParameters:
85
- Description: 'Enforce braces style around hash parameters.'
86
- Enabled: true
87
-
88
- Style/CaseEquality:
89
- Description: 'Avoid explicit use of the case equality operator(===).'
90
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
91
- Enabled: true
92
-
93
- Style/CaseIndentation:
94
- Description: 'Indentation of when in a case/when/[else/]end.'
95
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
96
- Enabled: true
97
-
98
- Style/CharacterLiteral:
99
- Description: 'Checks for uses of character literals.'
100
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
101
- Enabled: true
102
-
103
- Style/ClassAndModuleCamelCase:
104
- Description: 'Use CamelCase for classes and modules.'
105
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
106
- Enabled: true
107
-
108
- Style/ClassAndModuleChildren:
109
- Description: 'Checks style of children classes and modules.'
110
- Enabled: true
111
-
112
- Style/ClassCheck:
113
- Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
114
- Enabled: true
115
-
116
- Style/ClassMethods:
117
- Description: 'Use self when defining module/class methods.'
118
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-singletons'
119
- Enabled: true
120
-
121
- Style/ClassVars:
122
- Description: 'Avoid the use of class variables.'
123
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
124
- Enabled: true
125
-
126
- Style/ColonMethodCall:
127
- Description: 'Do not use :: for method call.'
128
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
129
- Enabled: true
130
-
131
- Style/CommandLiteral:
132
- Description: 'Use `` or %x around command literals.'
133
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
134
- Enabled: true
135
-
136
- Style/CommentAnnotation:
137
- Description: >-
138
- Checks formatting of special comments
139
- (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
140
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
141
- Enabled: true
142
-
143
- Style/CommentIndentation:
144
- Description: 'Indentation of comments.'
145
- Enabled: true
146
-
147
- Style/ConstantName:
148
- Description: 'Constants should use SCREAMING_SNAKE_CASE.'
149
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
150
- Enabled: true
151
-
152
- Style/DefWithParentheses:
153
- Description: 'Use def with parentheses when there are arguments.'
154
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
155
- Enabled: true
156
-
157
- Style/DeprecatedHashMethods:
158
- Description: 'Checks for use of deprecated Hash methods.'
159
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
160
- Enabled: true
161
-
162
14
  Style/Documentation:
163
15
  Description: 'Document classes and non-namespace modules.'
164
16
  Enabled: false
165
17
 
166
- Style/DotPosition:
167
- Description: 'Checks the position of the dot in multi-line method calls.'
168
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
169
- Enabled: true
170
-
171
- Style/DoubleNegation:
172
- Description: 'Checks for uses of double negation (!!).'
173
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
174
- Enabled: true
175
-
176
- Style/EachWithObject:
177
- Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
178
- Enabled: true
179
-
180
- Style/ElseAlignment:
181
- Description: 'Align elses and elsifs correctly.'
182
- Enabled: true
183
-
184
- Style/EmptyElse:
185
- Description: 'Avoid empty else-clauses.'
186
- Enabled: true
187
-
188
- Style/EmptyLineBetweenDefs:
189
- Description: 'Use empty lines between defs.'
190
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
191
- Enabled: true
192
-
193
- Style/EmptyLines:
194
- Description: "Don't use several empty lines in a row."
195
- Enabled: true
196
-
197
- Style/EmptyLinesAroundAccessModifier:
198
- Description: "Keep blank lines around access modifiers."
199
- Enabled: true
200
-
201
- Style/EmptyLinesAroundBlockBody:
202
- Description: "Keeps track of empty lines around block bodies."
203
- Enabled: true
204
-
205
- Style/EmptyLinesAroundClassBody:
206
- Description: "Keeps track of empty lines around class bodies."
207
- Enabled: true
208
-
209
- Style/EmptyLinesAroundModuleBody:
210
- Description: "Keeps track of empty lines around module bodies."
211
- Enabled: true
212
-
213
- Style/EmptyLinesAroundMethodBody:
214
- Description: "Keeps track of empty lines around method bodies."
215
- Enabled: true
216
-
217
- Style/EmptyLiteral:
218
- Description: 'Prefer literals to Array.new/Hash.new/String.new.'
219
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
220
- Enabled: true
221
-
222
- Style/EndBlock:
223
- Description: 'Avoid the use of END blocks.'
224
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
225
- Enabled: true
226
-
227
- Style/EndOfLine:
228
- Description: 'Use Unix-style line endings.'
229
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
230
- Enabled: true
231
-
232
- Style/EvenOdd:
233
- Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
234
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
235
- Enabled: true
236
-
237
- Style/FileName:
238
- Description: 'Use snake_case for source file names.'
239
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
240
- Enabled: true
241
-
242
- Style/FirstParameterIndentation:
243
- Description: 'Checks the indentation of the first parameter in a method call.'
244
- Enabled: true
245
-
246
- Style/FlipFlop:
247
- Description: 'Checks for flip flops'
248
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
249
- Enabled: true
250
-
251
- Style/For:
252
- Description: 'Checks use of for or each in multiline loops.'
253
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
254
- Enabled: true
255
-
256
- Style/FormatString:
257
- Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
258
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
259
- Enabled: true
260
-
261
- Style/GlobalVars:
262
- Description: 'Do not introduce global variables.'
263
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
264
- Enabled: true
265
-
266
- Style/GuardClause:
267
- Description: 'Check for conditionals that can be replaced with guard clauses'
268
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
269
- Enabled: true
270
-
271
- Style/HashSyntax:
272
- Description: >-
273
- Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
274
- { :a => 1, :b => 2 }.
275
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
276
- Enabled: true
277
-
278
- Style/IfUnlessModifier:
279
- Description: >-
280
- Favor modifier if/unless usage when you have a
281
- single-line body.
282
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
283
- Enabled: true
284
-
285
- Style/IfWithSemicolon:
286
- Description: 'Do not use if x; .... Use the ternary operator instead.'
287
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
288
- Enabled: true
289
-
290
- Style/IndentationConsistency:
291
- Description: 'Keep indentation straight.'
292
- Enabled: true
293
-
294
- Style/IndentationWidth:
295
- Description: 'Use 2 spaces for indentation.'
296
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
297
- Enabled: true
298
-
299
- Style/IndentArray:
300
- Description: >-
301
- Checks the indentation of the first element in an array
302
- literal.
303
- Enabled: true
304
-
305
- Style/IndentHash:
306
- Description: 'Checks the indentation of the first key in a hash literal.'
307
- Enabled: true
308
-
309
- Style/InfiniteLoop:
310
- Description: 'Use Kernel#loop for infinite loops.'
311
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
312
- Enabled: true
313
-
314
- Style/Lambda:
315
- Description: 'Use the new lambda literal syntax for single-line blocks.'
316
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
317
- Enabled: true
318
-
319
- Style/LambdaCall:
320
- Description: 'Use lambda.call(...) instead of lambda.(...).'
321
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
322
- Enabled: true
323
-
324
- Style/LeadingCommentSpace:
325
- Description: 'Comments should start with a space.'
326
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
327
- Enabled: true
328
-
329
- Style/LineEndConcatenation:
330
- Description: >-
331
- Use \ instead of + or << to concatenate two string literals at
332
- line end.
333
- Enabled: true
334
-
335
- Style/MethodCallParentheses:
336
- Description: 'Do not use parentheses for method calls with no arguments.'
337
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
338
- Enabled: true
339
-
340
- Style/MethodDefParentheses:
341
- Description: >-
342
- Checks if the method definitions have or don't have
343
- parentheses.
344
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
345
- Enabled: true
346
-
347
- Style/MethodName:
348
- Description: 'Use the configured style when naming methods.'
349
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
350
- Enabled: true
351
-
352
- Style/ModuleFunction:
353
- Description: 'Checks for usage of `extend self` in modules.'
354
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
355
- Enabled: true
356
-
357
- Style/MultilineBlockChain:
358
- Description: 'Avoid multi-line chains of blocks.'
359
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
360
- Enabled: true
361
-
362
- Style/MultilineBlockLayout:
363
- Description: 'Ensures newlines after multiline block do statements.'
364
- Enabled: false
365
-
366
- Style/MultilineIfThen:
367
- Description: 'Do not use then for multi-line if/unless.'
368
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
369
- Enabled: true
370
-
371
- Style/MultilineOperationIndentation:
372
- Description: >-
373
- Checks indentation of binary operations that span more than
374
- one line.
375
- Enabled: true
376
-
377
- Style/MultilineTernaryOperator:
378
- Description: >-
379
- Avoid multi-line ?: (the ternary operator);
380
- use if/unless instead.
381
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
382
- Enabled: true
383
-
384
- Style/NegatedIf:
385
- Description: >-
386
- Favor unless over if for negative conditions
387
- (or control flow or).
388
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
389
- Enabled: true
390
-
391
- Style/NegatedWhile:
392
- Description: 'Favor until over while for negative conditions.'
393
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
394
- Enabled: true
395
-
396
- Style/NestedTernaryOperator:
397
- Description: 'Use one expression per branch in a ternary operator.'
398
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
399
- Enabled: true
400
-
401
- Style/Next:
402
- Description: 'Use `next` to skip iteration instead of a condition at the end.'
403
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
404
- Enabled: true
405
-
406
- Style/NilComparison:
407
- Description: 'Prefer x.nil? to x == nil.'
408
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
409
- Enabled: true
410
-
411
- Style/NonNilCheck:
412
- Description: 'Checks for redundant nil checks.'
413
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
414
- Enabled: true
415
-
416
- Style/Not:
417
- Description: 'Use ! instead of not.'
418
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
419
- Enabled: true
420
-
421
- Style/NumericLiterals:
422
- Description: >-
423
- Add underscores to large numeric literals to improve their
424
- readability.
425
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
426
- Enabled: true
427
-
428
- Style/OneLineConditional:
429
- Description: >-
430
- Favor the ternary operator(?:) over
431
- if/then/else/end constructs.
432
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
433
- Enabled: true
434
-
435
- Style/OpMethod:
436
- Description: 'When defining binary operators, name the argument other.'
437
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
438
- Enabled: true
439
-
440
- Style/ParenthesesAroundCondition:
441
- Description: >-
442
- Don't use parentheses around the condition of an
443
- if/unless/while.
444
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
445
- Enabled: true
446
-
447
- Style/PercentLiteralDelimiters:
448
- Description: 'Use `%`-literal delimiters consistently'
449
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
450
- Enabled: true
451
-
452
- Style/PercentQLiterals:
453
- Description: 'Checks if uses of %Q/%q match the configured preference.'
454
- Enabled: true
455
-
456
- Style/PerlBackrefs:
457
- Description: 'Avoid Perl-style regex back references.'
458
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
459
- Enabled: true
460
-
461
- Style/PredicateName:
462
- Description: 'Check the names of predicate methods.'
463
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
464
- Enabled: true
465
-
466
- Style/Proc:
467
- Description: 'Use proc instead of Proc.new.'
468
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
469
- Enabled: true
470
-
471
- Style/RaiseArgs:
472
- Description: 'Checks the arguments passed to raise/fail.'
473
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
474
- Enabled: true
475
-
476
- Style/RedundantBegin:
477
- Description: "Don't use begin blocks when they are not needed."
478
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
479
- Enabled: true
480
-
481
- Style/RedundantException:
482
- Description: "Checks for an obsolete RuntimeException argument in raise/fail."
483
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
484
- Enabled: true
485
-
486
- Style/RedundantReturn:
487
- Description: "Don't use return where it's not required."
488
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
489
- Enabled: true
490
-
491
- Style/RedundantSelf:
492
- Description: "Don't use self where it's not needed."
493
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
494
- Enabled: true
495
-
496
- Style/RegexpLiteral:
497
- Description: 'Use / or %r around regular expressions.'
498
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
499
- Enabled: true
500
-
501
- Style/RescueModifier:
502
- Description: 'Avoid using rescue in its modifier form.'
503
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
504
- Enabled: true
505
-
506
- Style/SelfAssignment:
507
- Description: >-
508
- Checks for places where self-assignment shorthand should have
509
- been used.
510
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
511
- Enabled: true
512
-
513
- Style/Semicolon:
514
- Description: "Don't use semicolons to terminate expressions."
515
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
516
- Enabled: true
517
-
518
- Style/SignalException:
519
- Description: 'Checks for proper usage of fail and raise.'
520
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
521
- Enabled: true
522
-
523
- Style/SingleLineBlockParams:
524
- Description: 'Enforces the names of some block params.'
525
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
526
- Enabled: true
527
-
528
- Style/SingleLineMethods:
529
- Description: 'Avoid single-line methods.'
530
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
531
- Enabled: true
532
-
533
18
  Style/SingleSpaceBeforeFirstArg:
534
19
  Description: >-
535
20
  Checks that exactly one space is used between a method name
536
21
  and the first argument for method calls without parentheses.
537
22
  Enabled: false
538
-
539
- Style/SpaceAfterColon:
540
- Description: 'Use spaces after colons.'
541
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
542
- Enabled: true
543
-
544
- Style/SpaceAfterComma:
545
- Description: 'Use spaces after commas.'
546
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
547
- Enabled: true
548
-
549
- Style/SpaceAfterControlKeyword:
550
- Description: 'Use spaces after if/elsif/unless/while/until/case/when.'
551
- Enabled: true
552
-
553
- Style/SpaceAfterMethodName:
554
- Description: >-
555
- Do not put a space between a method name and the opening
556
- parenthesis in a method definition.
557
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
558
- Enabled: true
559
-
560
- Style/SpaceAfterNot:
561
- Description: Tracks redundant space after the ! operator.
562
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
563
- Enabled: true
564
-
565
- Style/SpaceAfterSemicolon:
566
- Description: 'Use spaces after semicolons.'
567
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
568
- Enabled: true
569
-
570
- Style/SpaceBeforeBlockBraces:
571
- Description: >-
572
- Checks that the left block brace has or doesn't have space
573
- before it.
574
- Enabled: true
575
-
576
- Style/SpaceBeforeComma:
577
- Description: 'No spaces before commas.'
578
- Enabled: true
579
-
580
- Style/SpaceBeforeComment:
581
- Description: >-
582
- Checks for missing space between code and a comment on the
583
- same line.
584
- Enabled: true
585
-
586
- Style/SpaceBeforeSemicolon:
587
- Description: 'No spaces before semicolons.'
588
- Enabled: true
589
-
590
- Style/SpaceInsideBlockBraces:
591
- Description: >-
592
- Checks that block braces have or don't have surrounding space.
593
- For blocks taking parameters, checks that the left brace has
594
- or doesn't have trailing space.
595
- Enabled: true
596
-
597
- Style/SpaceAroundBlockParameters:
598
- Description: 'Checks the spacing inside and after block parameters pipes.'
599
- Enabled: true
600
-
601
- Style/SpaceAroundEqualsInParameterDefault:
602
- Description: >-
603
- Checks that the equals signs in parameter default assignments
604
- have or don't have surrounding space depending on
605
- configuration.
606
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
607
- Enabled: true
608
-
609
- Style/SpaceAroundOperators:
610
- Description: 'Use a single space around operators.'
611
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
612
- Enabled: false
613
-
614
- Style/SpaceBeforeModifierKeyword:
615
- Description: 'Put a space before the modifier keyword.'
616
- Enabled: true
617
-
618
- Style/SpaceInsideBrackets:
619
- Description: 'No spaces after [ or before ].'
620
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
621
- Enabled: true
622
-
623
- Style/SpaceInsideHashLiteralBraces:
624
- Description: "Use spaces inside hash literal braces - or don't."
625
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
626
- Enabled: true
627
-
628
- Style/SpaceInsideParens:
629
- Description: 'No spaces after ( or before ).'
630
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
631
- Enabled: true
632
-
633
- Style/SpaceInsideRangeLiteral:
634
- Description: 'No spaces inside range literals.'
635
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
636
- Enabled: true
637
-
638
- Style/SpecialGlobalVars:
639
- Description: 'Avoid Perl-style global variables.'
640
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
641
- Enabled: true
642
-
643
- Style/StringLiterals:
644
- Description: 'Checks if uses of quotes match the configured preference.'
645
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
646
- Enabled: true
647
-
648
- Style/StringLiteralsInInterpolation:
649
- Description: >-
650
- Checks if uses of quotes inside expressions in interpolated
651
- strings match the configured preference.
652
- Enabled: true
653
-
654
- Style/StructInheritance:
655
- Description: 'Checks for inheritance from Struct.new.'
656
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
657
- Enabled: true
658
-
659
- Style/SymbolLiteral:
660
- Description: 'Use plain symbols instead of string symbols when possible.'
661
- Enabled: true
662
-
663
- Style/SymbolProc:
664
- Description: 'Use symbols as procs instead of blocks when possible.'
665
- Enabled: true
666
-
667
- Style/Tab:
668
- Description: 'No hard tabs.'
669
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
670
- Enabled: true
671
-
672
- Style/TrailingBlankLines:
673
- Description: 'Checks trailing blank lines and final newline.'
674
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
675
- Enabled: true
676
-
677
- Style/TrailingComma:
678
- Description: 'Checks for trailing comma in parameter lists and literals.'
679
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
680
- Enabled: true
681
-
682
- Style/TrailingWhitespace:
683
- Description: 'Avoid trailing whitespace.'
684
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
685
- Enabled: true
686
-
687
- Style/TrivialAccessors:
688
- Description: 'Prefer attr_* methods to trivial readers/writers.'
689
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
690
- Enabled: true
691
-
692
- Style/UnlessElse:
693
- Description: >-
694
- Do not use unless with else. Rewrite these with the positive
695
- case first.
696
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
697
- Enabled: true
698
-
699
- Style/UnneededCapitalW:
700
- Description: 'Checks for %W when interpolation is not needed.'
701
- Enabled: true
702
-
703
- Style/UnneededPercentQ:
704
- Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
705
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
706
- Enabled: true
707
-
708
- Style/VariableInterpolation:
709
- Description: >-
710
- Don't interpolate global, instance and class variables
711
- directly in strings.
712
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
713
- Enabled: true
714
-
715
- Style/VariableName:
716
- Description: 'Use the configured style when naming variables.'
717
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
718
- Enabled: true
719
-
720
- Style/WhenThen:
721
- Description: 'Use when x then ... for one-line cases.'
722
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
723
- Enabled: true
724
-
725
- Style/WhileUntilDo:
726
- Description: 'Checks for redundant do after while or until.'
727
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
728
- Enabled: true
729
-
730
- Style/WhileUntilModifier:
731
- Description: >-
732
- Favor modifier while/until usage when you have a
733
- single-line body.
734
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
735
- Enabled: true
736
-
737
- Style/WordArray:
738
- Description: 'Use %w or %W for arrays of words.'
739
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
740
- Enabled: true
741
-
742
- #################### Metrics ################################
743
-
744
- Metrics/AbcSize:
745
- Description: >-
746
- A calculated magnitude based on number of assignments,
747
- branches, and conditions.
748
- Enabled: true
749
-
750
- Metrics/BlockNesting:
751
- Description: 'Avoid excessive block nesting'
752
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
753
- Enabled: true
754
-
755
- Metrics/ClassLength:
756
- Description: 'Avoid classes longer than 100 lines of code.'
757
- Enabled: false
758
-
759
- Metrics/CyclomaticComplexity:
760
- Description: >-
761
- A complexity metric that is strongly correlated to the number
762
- of test cases needed to validate a method.
763
- Enabled: true
764
-
765
- Metrics/LineLength:
766
- Description: 'Limit lines to 80 characters.'
767
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
768
- Enabled: true
769
-
770
- Metrics/MethodLength:
771
- Description: 'Avoid methods longer than 10 lines of code.'
772
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
773
- Enabled: true
774
-
775
- Metrics/ParameterLists:
776
- Description: 'Avoid parameter lists longer than three or four parameters.'
777
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
778
- Enabled: true
779
-
780
- Metrics/PerceivedComplexity:
781
- Description: >-
782
- A complexity metric geared towards measuring complexity for a
783
- human reader.
784
- Enabled: true
785
-
786
- #################### Lint ################################
787
- ### Warnings
788
-
789
- Lint/AmbiguousOperator:
790
- Description: >-
791
- Checks for ambiguous operators in the first argument of a
792
- method invocation without parentheses.
793
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
794
- Enabled: true
795
-
796
- Lint/AmbiguousRegexpLiteral:
797
- Description: >-
798
- Checks for ambiguous regexp literals in the first argument of
799
- a method invocation without parenthesis.
800
- Enabled: true
801
-
802
- Lint/AssignmentInCondition:
803
- Description: "Don't use assignment in conditions."
804
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
805
- Enabled: true
806
-
807
- Lint/BlockAlignment:
808
- Description: 'Align block ends correctly.'
809
- Enabled: true
810
-
811
- Lint/ConditionPosition:
812
- Description: >-
813
- Checks for condition placed in a confusing position relative to
814
- the keyword.
815
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
816
- Enabled: true
817
-
818
- Lint/Debugger:
819
- Description: 'Check for debugger calls.'
820
- Enabled: true
821
-
822
- Lint/DefEndAlignment:
823
- Description: 'Align ends corresponding to defs correctly.'
824
- Enabled: true
825
-
826
- Lint/DeprecatedClassMethods:
827
- Description: 'Check for deprecated class method calls.'
828
- Enabled: true
829
-
830
- Lint/DuplicateMethods:
831
- Description: 'Check for duplicate methods calls.'
832
- Enabled: true
833
-
834
- Lint/ElseLayout:
835
- Description: 'Check for odd code arrangement in an else block.'
836
- Enabled: true
837
-
838
- Lint/EmptyEnsure:
839
- Description: 'Checks for empty ensure block.'
840
- Enabled: true
841
-
842
- Lint/EmptyInterpolation:
843
- Description: 'Checks for empty string interpolation.'
844
- Enabled: true
845
-
846
- Lint/EndAlignment:
847
- Description: 'Align ends correctly.'
848
- Enabled: true
849
-
850
- Lint/EndInMethod:
851
- Description: 'END blocks should not be placed inside method definitions.'
852
- Enabled: true
853
-
854
- Lint/EnsureReturn:
855
- Description: 'Do not use return in an ensure block.'
856
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
857
- Enabled: true
858
-
859
- Lint/Eval:
860
- Description: 'The use of eval represents a serious security risk.'
861
- Enabled: false
862
-
863
- Lint/HandleExceptions:
864
- Description: "Don't suppress exception."
865
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
866
- Enabled: true
867
-
868
- Lint/InvalidCharacterLiteral:
869
- Description: >-
870
- Checks for invalid character literals with a non-escaped
871
- whitespace character.
872
- Enabled: true
873
-
874
- Lint/LiteralInCondition:
875
- Description: 'Checks of literals used in conditions.'
876
- Enabled: true
877
-
878
- Lint/LiteralInInterpolation:
879
- Description: 'Checks for literals used in interpolation.'
880
- Enabled: true
881
-
882
- Lint/Loop:
883
- Description: >-
884
- Use Kernel#loop with break rather than begin/end/until or
885
- begin/end/while for post-loop tests.
886
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
887
- Enabled: true
888
-
889
- Lint/NonLocalExitFromIterator:
890
- Description: 'Do not use return in iterator to cause non-local exit.'
891
- Enabled: true
892
-
893
- Lint/ParenthesesAsGroupedExpression:
894
- Description: >-
895
- Checks for method calls with a space before the opening
896
- parenthesis.
897
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
898
- Enabled: true
899
-
900
- Lint/RequireParentheses:
901
- Description: >-
902
- Use parentheses in the method call to avoid confusion
903
- about precedence.
904
- Enabled: true
905
-
906
- Lint/RescueException:
907
- Description: 'Avoid rescuing the Exception class.'
908
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
909
- Enabled: true
910
-
911
- Lint/ShadowingOuterLocalVariable:
912
- Description: >-
913
- Do not use the same name as outer local variable
914
- for block arguments or block local variables.
915
- Enabled: true
916
-
917
- Lint/SpaceBeforeFirstArg:
918
- Description: >-
919
- Put a space between a method name and the first argument
920
- in a method call without parentheses.
921
- Enabled: true
922
-
923
- Lint/StringConversionInInterpolation:
924
- Description: 'Checks for Object#to_s usage in string interpolation.'
925
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
926
- Enabled: true
927
-
928
- Lint/UnderscorePrefixedVariableName:
929
- Description: 'Do not use prefix `_` for a variable that is used.'
930
- Enabled: true
931
-
932
- Lint/UnusedBlockArgument:
933
- Description: 'Checks for unused block arguments.'
934
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
935
- Enabled: true
936
-
937
- Lint/UnusedMethodArgument:
938
- Description: 'Checks for unused method arguments.'
939
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
940
- Enabled: true
941
-
942
- Lint/UnreachableCode:
943
- Description: 'Unreachable code.'
944
- Enabled: true
945
-
946
- Lint/UselessAccessModifier:
947
- Description: 'Checks for useless access modifiers.'
948
- Enabled: true
949
-
950
- Lint/UselessAssignment:
951
- Description: 'Checks for useless assignment to a local variable.'
952
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
953
- Enabled: true
954
-
955
- Lint/UselessComparison:
956
- Description: 'Checks for comparison of something with itself.'
957
- Enabled: true
958
-
959
- Lint/UselessElseWithoutRescue:
960
- Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
961
- Enabled: true
962
-
963
- Lint/UselessSetterCall:
964
- Description: 'Checks for useless setter call to a local variable.'
965
- Enabled: true
966
-
967
- Lint/Void:
968
- Description: 'Possible use of operator/literal/variable in void context.'
969
- Enabled: true
970
-
971
- ##################### Performance #############################
972
-
973
- Performance/Size:
974
- Description: >-
975
- Use `size` instead of `count` for counting
976
- the number of elements in `Array` and `Hash`.
977
- Enabled: true
978
-
979
- Performance/Detect:
980
- Description: >-
981
- Use `detect` instead of `select.first`, `find_all.first`,
982
- `select.last`, and `find_all.last`.
983
- Enabled: true
984
-
985
- Performance/ReverseEach:
986
- Description: 'Use `reverse_each` instead of `reverse.each`.'
987
- Enabled: true
988
-
989
- Performance/Sample:
990
- Description: >-
991
- Use `sample` instead of `shuffle.first`,
992
- `shuffle.last`, and `shuffle[Fixnum]`.
993
- Enabled: true
994
-
995
- ##################### Rails ##################################
996
-
997
- Rails/ActionFilter:
998
- Description: 'Enforces consistent use of action filter methods.'
999
- Enabled: true
1000
-
1001
- Rails/Date:
1002
- Description: >-
1003
- Checks the correct usage of date aware methods,
1004
- such as Date.today, Date.current etc.
1005
- Enabled: true
1006
-
1007
- Rails/DefaultScope:
1008
- Description: 'Checks if the argument passed to default_scope is a block.'
1009
- Enabled: true
1010
-
1011
- Rails/Delegate:
1012
- Description: 'Prefer delegate method for delegations.'
1013
- Enabled: true
1014
-
1015
- Rails/HasAndBelongsToMany:
1016
- Description: 'Prefer has_many :through to has_and_belongs_to_many.'
1017
- Enabled: true
1018
-
1019
- Rails/Output:
1020
- Description: 'Checks for calls to puts, print, etc.'
1021
- Enabled: true
1022
-
1023
- Rails/ReadWriteAttribute:
1024
- Description: >-
1025
- Checks for read_attribute(:attr) and
1026
- write_attribute(:attr, val).
1027
- Enabled: true
1028
-
1029
- Rails/ScopeArgs:
1030
- Description: 'Checks the arguments of ActiveRecord scopes.'
1031
- Enabled: true
1032
-
1033
- Rails/TimeZone:
1034
- Description: 'Checks the correct usage of time zone aware methods.'
1035
- Enabled: true
1036
-
1037
- Rails/Validation:
1038
- Description: 'Use validates :attribute, hash of validations.'
1039
- Enabled: true