ribose 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rubocop.yml +539 -970
  4. data/.sample.pryrc +4 -0
  5. data/CHANGELOG.md +5 -0
  6. data/README.md +539 -3
  7. data/bin/console +2 -5
  8. data/lib/ribose.rb +31 -1
  9. data/lib/ribose/actions.rb +10 -0
  10. data/lib/ribose/actions/all.rb +43 -0
  11. data/lib/ribose/actions/base.rb +11 -0
  12. data/lib/ribose/actions/create.rb +44 -0
  13. data/lib/ribose/actions/delete.rb +32 -0
  14. data/lib/ribose/actions/fetch.rb +44 -0
  15. data/lib/ribose/actions/update.rb +35 -0
  16. data/lib/ribose/app_data.rb +15 -0
  17. data/lib/ribose/app_relation.rb +12 -0
  18. data/lib/ribose/base.rb +48 -0
  19. data/lib/ribose/calendar.rb +22 -0
  20. data/lib/ribose/client.rb +31 -0
  21. data/lib/ribose/config.rb +21 -0
  22. data/lib/ribose/configuration.rb +25 -0
  23. data/lib/ribose/connection.rb +39 -0
  24. data/lib/ribose/connection_invitation.rb +51 -0
  25. data/lib/ribose/conversation.rb +87 -0
  26. data/lib/ribose/error.rb +30 -0
  27. data/lib/ribose/feed.rb +11 -0
  28. data/lib/ribose/file_uploader.rb +93 -0
  29. data/lib/ribose/join_space_request.rb +41 -0
  30. data/lib/ribose/leaderboard.rb +19 -0
  31. data/lib/ribose/member.rb +34 -0
  32. data/lib/ribose/message.rb +94 -0
  33. data/lib/ribose/profile.rb +56 -0
  34. data/lib/ribose/request.rb +122 -0
  35. data/lib/ribose/resource_helper.rb +81 -0
  36. data/lib/ribose/response/raise_error.rb +15 -0
  37. data/lib/ribose/rspec.rb +19 -0
  38. data/lib/ribose/session.rb +48 -0
  39. data/lib/ribose/setting.rb +16 -0
  40. data/lib/ribose/space.rb +30 -0
  41. data/lib/ribose/space_file.rb +49 -0
  42. data/lib/ribose/space_invitation.rb +70 -0
  43. data/lib/ribose/stream.rb +15 -0
  44. data/lib/ribose/user.rb +42 -0
  45. data/lib/ribose/version.rb +1 -1
  46. data/lib/ribose/widget.rb +11 -0
  47. data/lib/ribose/wiki.rb +80 -0
  48. data/ribose.gemspec +6 -0
  49. data/spec/fixtures/app_data.json +188 -0
  50. data/spec/fixtures/app_relation.json +19 -0
  51. data/spec/fixtures/app_relations.json +89 -0
  52. data/spec/fixtures/calendar.json +12 -0
  53. data/spec/fixtures/calendars.json +34 -0
  54. data/spec/fixtures/connection_invitation.json +26 -0
  55. data/spec/fixtures/connection_invitation_accepted.json +26 -0
  56. data/spec/fixtures/connection_invitations.json +28 -0
  57. data/spec/fixtures/connection_invitations_created.json +37 -0
  58. data/spec/fixtures/connection_suggestion.json +22 -0
  59. data/spec/fixtures/connections.json +28 -0
  60. data/spec/fixtures/conversation.json +26 -0
  61. data/spec/fixtures/conversation_created.json +31 -0
  62. data/spec/fixtures/conversations.json +34 -0
  63. data/spec/fixtures/empty.json +1 -0
  64. data/spec/fixtures/feeds.json +84 -0
  65. data/spec/fixtures/file_upload_prepared.json +17 -0
  66. data/spec/fixtures/file_uploaded.json +38 -0
  67. data/spec/fixtures/general_information.json +16 -0
  68. data/spec/fixtures/join_space_request_created.json +26 -0
  69. data/spec/fixtures/join_space_request_updated.json +25 -0
  70. data/spec/fixtures/join_space_requests.json +34 -0
  71. data/spec/fixtures/leaderboard.json +21 -0
  72. data/spec/fixtures/login.html +323 -0
  73. data/spec/fixtures/members.json +20 -0
  74. data/spec/fixtures/message.json +22 -0
  75. data/spec/fixtures/messages.json +24 -0
  76. data/spec/fixtures/ping.json +3 -0
  77. data/spec/fixtures/profile.json +10 -0
  78. data/spec/fixtures/sample.png +0 -0
  79. data/spec/fixtures/setting.json +16 -0
  80. data/spec/fixtures/settings.json +18 -0
  81. data/spec/fixtures/space.json +59 -0
  82. data/spec/fixtures/space_created.json +59 -0
  83. data/spec/fixtures/space_file.json +58 -0
  84. data/spec/fixtures/space_invitation.json +32 -0
  85. data/spec/fixtures/space_invitation_updated.json +35 -0
  86. data/spec/fixtures/space_invitations.json +34 -0
  87. data/spec/fixtures/space_mass_invitations.json +46 -0
  88. data/spec/fixtures/spaces.json +61 -0
  89. data/spec/fixtures/stream.json +176 -0
  90. data/spec/fixtures/user_activated.json +6 -0
  91. data/spec/fixtures/widgets.json +50 -0
  92. data/spec/fixtures/wiki.json +79 -0
  93. data/spec/fixtures/wikis.json +197 -0
  94. data/spec/ribose/actions/create_spec.rb +40 -0
  95. data/spec/ribose/actions/delete_spec.rb +24 -0
  96. data/spec/ribose/actions/fetch_spec.rb +32 -0
  97. data/spec/ribose/actions/update_spec.rb +36 -0
  98. data/spec/ribose/app_data_spec.rb +15 -0
  99. data/spec/ribose/app_relation_spec.rb +27 -0
  100. data/spec/ribose/calendar_spec.rb +50 -0
  101. data/spec/ribose/client_spec.rb +48 -0
  102. data/spec/ribose/config_spec.rb +41 -0
  103. data/spec/ribose/connection_invitation_spec.rb +79 -0
  104. data/spec/ribose/connection_spec.rb +26 -0
  105. data/spec/ribose/conversation_spec.rb +84 -0
  106. data/spec/ribose/error_spec.rb +67 -0
  107. data/spec/ribose/feed_spec.rb +14 -0
  108. data/spec/ribose/file_uploader_spec.rb +30 -0
  109. data/spec/ribose/join_space_request_spec.rb +70 -0
  110. data/spec/ribose/leaderboard_spec.rb +13 -0
  111. data/spec/ribose/member_spec.rb +16 -0
  112. data/spec/ribose/message_spec.rb +69 -0
  113. data/spec/ribose/profile_spec.rb +40 -0
  114. data/spec/ribose/request_spec.rb +66 -0
  115. data/spec/ribose/resource_helper_spec.rb +58 -0
  116. data/spec/ribose/session_spec.rb +46 -0
  117. data/spec/ribose/setting_spec.rb +40 -0
  118. data/spec/ribose/space_file_spec.rb +41 -0
  119. data/spec/ribose/space_invitation_spec.rb +117 -0
  120. data/spec/ribose/space_spec.rb +70 -0
  121. data/spec/ribose/stream_spec.rb +14 -0
  122. data/spec/ribose/user_spec.rb +48 -0
  123. data/spec/ribose/widget_spec.rb +14 -0
  124. data/spec/ribose/wiki_spec.rb +67 -0
  125. data/spec/spec_helper.rb +11 -0
  126. data/spec/support/fake_ribose_api.rb +431 -0
  127. data/spec/support/file_upload_stub.rb +76 -0
  128. metadata +190 -3
  129. data/spec/ribose_spec.rb +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c929f45b0444c15da50fc733a113323af06fff1
4
- data.tar.gz: 4397e2fd284e6cf61a89d2024511aa38f77bb4d5
3
+ metadata.gz: d354b8d6ab133682679a05fafc1bd89923e25c41
4
+ data.tar.gz: 96de2725a2b74c71ae4abbd39ad495798e6723f2
5
5
  SHA512:
6
- metadata.gz: 46872d9a5273a506de11516511bbfa5599e45c30867f4c7c0e108d4a11bfff7101a8041bea109d537c06f165b37c3a36efce339772c2c34c14566373678d7536
7
- data.tar.gz: 0363b0f70367b54001dbdf92c56b6571fa3301128e9147251d0cd985c64aa5eb338df82978346ff61842fe79bfe10eb3b622799ca8c08f17b6abd673f8d2c1c9
6
+ metadata.gz: 52ce6c951da550947baa60c5a2f0a052758574fdd883305ca0a6945bbee6bfcfecc0664e693716d8d5e76a9efbca1c508e6e211080af01e18605fa4a9d71b570
7
+ data.tar.gz: d7d9060a0e6915384cb766e4f271a6542c0390ba801d22867ae852c36f2062b75e6c00370999d865ede2f71dcb141b1cd124784604ac76f4727ed9a09141edf9
data/.gitignore CHANGED
@@ -7,6 +7,7 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /.pryrc
10
11
 
11
12
  # rspec failure tracking
12
13
  .rspec_status
data/.rubocop.yml CHANGED
@@ -1,1076 +1,645 @@
1
1
  AllCops:
2
2
  Include:
3
- - "**/*.rake"
4
- - "**/Gemfile"
5
- - "**/Rakefile"
3
+ - "**/*.rake"
4
+ - "**/Gemfile"
5
+ - "**/Rakefile"
6
+
6
7
  Exclude:
7
- - "vendor/**/*"
8
- - "db/**/*"
9
- DisplayCopNames: false
10
- StyleGuideCopsOnly: false
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
- Style/For:
92
- Description: Checks use of for or each in multiline loops.
93
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
94
- Enabled: true
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
- AllowedVariables: []
113
- Style/GuardClause:
114
- Description: Check for conditionals that can be replaced with guard clauses
115
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
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
- MaxLineLength: 80
132
- Style/LambdaCall:
133
- Description: Use lambda.call(...) instead of lambda.(...).
134
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
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
- EnforcedStyle: call
137
- SupportedStyles:
138
- - call
139
- - braces
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
- MinDigits: 5
175
- Style/NumericPredicate:
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
- Style/ParenthesesAroundCondition:
178
- Description: Don't use parentheses around the condition of an if/unless/while.
179
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
180
- Enabled: true
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
- AllowIfMethodIsEmpty: true
262
- Style/StringLiterals:
263
- Description: Checks if uses of quotes match the configured preference.
264
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
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
- MaxLineLength: 80
337
- Style/WordArray:
338
- Description: Use %w or %W for arrays of words.
339
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
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
- MinSize: 0
342
- WordRegex: !ruby/regexp /\A[\p{Word}]+\z/
343
- Metrics/AbcSize:
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
- Max: 3
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
- CountComments: false
360
- Max: 100
361
- Metrics/CyclomaticComplexity:
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
- AllowSafeAssignment: true
399
- Lint/EndAlignment:
400
- Description: Align ends correctly.
401
- Enabled: true
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
- Rails/Output:
430
- Description: Checks for calls to puts, print, etc.
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
- Include:
451
- - app/models/**/*.rb
452
- Style/InlineComment:
453
- Description: Avoid inline comments.
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
- Style/MethodCalledOnDoEndBlock:
456
- Description: Avoid chaining a method call on a do...end block.
457
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
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
- Style/SymbolArray:
460
- Description: Use %i or %I for arrays of symbols.
461
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
91
+
92
+ Metrics/AbcSize:
93
+ Description: >-
94
+ A calculated magnitude based on number of assignments,
95
+ branches, and conditions.
462
96
  Enabled: false
463
- Style/AccessorMethodName:
464
- Description: Check the naming of accessor methods for get_/set_.
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
- Style/Alias:
467
- Description: Use alias_method instead of alias.
468
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
110
+
111
+ Rails/Delegate:
112
+ Description: 'Prefer delegate method for delegations.'
469
113
  Enabled: false
470
- Style/ArrayJoin:
471
- Description: Use Array#join instead of Array#*.
472
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
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
- Style/AsciiComments:
475
- Description: Use only ascii symbols in comments.
476
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
119
+
120
+ Style/Documentation:
121
+ Description: 'Document classes and non-namespace modules.'
477
122
  Enabled: false
478
- Style/AsciiIdentifiers:
479
- Description: Use only ascii symbols in identifiers.
480
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
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
- Style/Attr:
483
- Description: Checks for uses of Module#attr.
484
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
128
+
129
+ Style/EachWithObject:
130
+ Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
485
131
  Enabled: false
486
- Style/BeginBlock:
487
- Description: Avoid the use of BEGIN blocks.
488
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
489
- Enabled: true
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
- Style/CharacterLiteral:
504
- Description: Checks for uses of character literals.
505
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
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
- Style/ClassAndModuleCamelCase:
508
- Description: Use CamelCase for classes and modules.
509
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
510
- Enabled: true
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
- Style/ColonMethodCall:
520
- Description: 'Do not use :: for method call.'
521
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
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
- Style/ConstantName:
524
- Description: Constants should use SCREAMING_SNAKE_CASE.
525
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
526
- Enabled: true
527
- Style/DefWithParentheses:
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
- Style/DoubleNegation:
535
- Description: Checks for uses of double negation (!!).
536
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
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
- Style/EachWithObject:
539
- Description: Prefer `each_with_object` over `inject` or `reduce`.
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
- Style/EmptyElse:
542
- Description: Avoid empty else-clauses.
543
- Enabled: true
544
- Style/EmptyLiteral:
545
- Description: Prefer literals to Array.new/Hash.new/String.new.
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
- Style/EndBlock:
549
- Description: Avoid the use of END blocks.
550
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
551
- Enabled: true
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
- Style/FlipFlop:
557
- Description: Checks for flip flops
558
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
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
- Style/InfiniteLoop:
565
- Description: Use Kernel#loop for infinite loops.
566
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
567
- Enabled: true
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: Use \ instead of + or << to concatenate two string literals at line
574
- end.
208
+ Description: >-
209
+ Use \ instead of + or << to concatenate two string literals at
210
+ line end.
575
211
  Enabled: false
576
- Style/MethodCallWithoutArgsParentheses:
577
- Description: Do not use parentheses for method calls with no arguments.
578
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
579
- Enabled: true
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
- Style/MultilineIfThen:
585
- Description: Do not use then for multi-line if/unless.
586
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
587
- Enabled: true
588
- Style/MultilineTernaryOperator:
589
- Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
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: Favor unless over if for negative conditions (or control flow or).
594
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
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
- Style/NestedTernaryOperator:
601
- Description: Use one expression per branch in a ternary operator.
602
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
603
- Enabled: true
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: Favor the ternary operator(?:) over if/then/else/end constructs.
614
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
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
- Style/OpMethod:
617
- Description: When defining binary operators, name the argument other.
618
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
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
- Style/PerlBackrefs:
621
- Description: Avoid Perl-style regex back references.
622
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
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
- Style/PreferredHashMethods:
625
- Description: Checks for use of deprecated Hash methods.
626
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
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
- Style/RedundantBegin:
633
- Description: Don't use begin blocks when they are not needed.
634
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
635
- Enabled: true
636
- Style/RedundantException:
637
- Description: Checks for an obsolete RuntimeException argument in raise/fail.
638
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
639
- Enabled: true
640
- Style/RedundantSelf:
641
- Description: Don't use self where it's not needed.
642
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
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: Checks for places where self-assignment shorthand should have been
650
- used.
651
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
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
- Style/StructInheritance:
658
- Description: Checks for inheritance from Struct.new.
659
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
660
- Enabled: true
661
- Style/UnlessElse:
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
- Style/UnneededPercentQ:
669
- Description: Checks for %q/%Q when single quotes or double quotes would do.
670
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
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
- Style/CommandLiteral:
673
- Description: Checks for %x when `` would do.
674
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
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: Don't interpolate global, instance and class variables directly in
678
- strings.
679
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
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
- Style/WhileUntilDo:
686
- Description: Checks for redundant do after while or until.
687
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
688
- Enabled: true
689
- Layout/AccessModifierIndentation:
690
- Description: Check indentation of private/protected visibility modifiers.
691
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
692
- Enabled: true
693
- EnforcedStyle: indent
694
- SupportedStyles:
695
- - outdent
696
- - indent
697
- Layout/AlignHash:
698
- Description: Align the elements of a hash literal if they span more than one line.
699
- Enabled: true
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: Align the parameters of a method call if they span more than one line.
710
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
711
- Enabled: true
712
- EnforcedStyle: with_first_parameter
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
- SupportedStyles:
734
- - leading
735
- - trailing
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
- EnforcedStyle: indented
787
- SupportedStyles:
788
- - aligned
789
- - indented
414
+
790
415
  Layout/MultilineOperationIndentation:
791
- Description: Checks indentation of binary operations that span more than one line.
416
+ Description: >-
417
+ Checks indentation of binary operations that span more than
418
+ one line.
792
419
  Enabled: true
793
420
  EnforcedStyle: indented
794
- SupportedStyles:
795
- - aligned
796
- - indented
797
- Layout/SpaceAroundBlockParameters:
798
- Description: Checks the spacing inside and after block parameters pipes.
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: Checks for ambiguous operators in the first argument of a method invocation
960
- without parentheses.
961
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
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: Checks for ambiguous regexp literals in the first argument of a method
965
- invocation without parenthesis.
444
+ Description: >-
445
+ Checks for ambiguous regexp literals in the first argument of
446
+ a method invocation without parenthesis.
966
447
  Enabled: false
967
- Lint/BlockAlignment:
968
- Description: Align block ends correctly.
969
- Enabled: true
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: Checks for condition placed in a confusing position relative to the
972
- keyword.
973
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
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
- Lint/Debugger:
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
- Lint/DuplicateMethods:
982
- Description: Check for duplicate methods calls.
983
- Enabled: true
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
- Lint/EmptyEnsure:
988
- Description: Checks for empty ensure block.
989
- Enabled: true
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
- Lint/InvalidCharacterLiteral:
1005
- Description: Checks for invalid character literals with a non-escaped whitespace
1006
- character.
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: Use Kernel#loop with break rather than begin/end/until or begin/end/while
1016
- for post-loop tests.
1017
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
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: Checks for method calls with a space before the opening parenthesis.
1021
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
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: Use parentheses in the method call to avoid confusion about precedence.
522
+ Description: >-
523
+ Use parentheses in the method call to avoid confusion
524
+ about precedence.
1025
525
  Enabled: false
1026
- Lint/RescueException:
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
- Lint/UnusedBlockArgument:
1042
- Description: Checks for unused block arguments.
1043
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1044
- Enabled: true
1045
- Lint/UnusedMethodArgument:
1046
- Description: Checks for unused method arguments.
1047
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1048
- Enabled: true
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
- Rails/Delegate:
1072
- Description: Prefer delegate method for delegations.
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