human_attributes 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +104 -0
- data/.circleci/setup-rubygems.sh +3 -0
- data/.rubocop.yml +65 -594
- data/.ruby-version +1 -1
- data/CHANGELOG.md +11 -0
- data/Gemfile.lock +219 -147
- data/Guardfile +4 -4
- data/README.md +127 -26
- data/Rakefile +1 -1
- data/human_attributes.gemspec +11 -7
- data/lib/human_attributes/config.rb +50 -68
- data/lib/human_attributes/engine.rb +1 -0
- data/lib/human_attributes/errors.rb +6 -0
- data/lib/human_attributes/extension.rb +21 -26
- data/lib/human_attributes/formatters/base.rb +1 -0
- data/lib/human_attributes/formatters/enum.rb +25 -0
- data/lib/human_attributes/formatters/enumerize.rb +1 -0
- data/lib/human_attributes/formatters_builder.rb +1 -0
- data/lib/human_attributes/version.rb +1 -1
- data/spec/dummy/Rakefile +1 -1
- data/spec/dummy/app/assets/config/manifest.js +3 -0
- data/spec/dummy/app/assets/stylesheets/application.css +3 -3
- data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
- data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +0 -3
- data/spec/dummy/app/{assets/javascripts → javascript/packs}/application.js +3 -1
- data/spec/dummy/app/jobs/application_job.rb +7 -0
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/models/purchase.rb +20 -11
- data/spec/dummy/app/views/layouts/application.html.erb +10 -9
- data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/spec/dummy/bin/rails +3 -3
- data/spec/dummy/bin/rake +2 -2
- data/spec/dummy/bin/setup +18 -14
- data/spec/dummy/config/application.rb +12 -22
- data/spec/dummy/config/boot.rb +3 -3
- data/spec/dummy/config/cable.yml +10 -0
- data/spec/dummy/config/database.yml +4 -18
- data/spec/dummy/config/environment.rb +1 -1
- data/spec/dummy/config/environments/development.rb +49 -14
- data/spec/dummy/config/environments/production.rb +63 -22
- data/spec/dummy/config/environments/test.rb +29 -12
- data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/spec/dummy/config/initializers/assets.rb +4 -3
- data/spec/dummy/config/initializers/backtrace_silencers.rb +4 -3
- data/spec/dummy/config/initializers/content_security_policy.rb +28 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +2 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +3 -1
- data/spec/dummy/config/initializers/permissions_policy.rb +11 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +2 -2
- data/spec/dummy/config/locales/en.yml +26 -1
- data/spec/dummy/config/puma.rb +43 -0
- data/spec/dummy/config/routes.rb +1 -54
- data/spec/dummy/config/storage.yml +34 -0
- data/spec/dummy/config.ru +3 -1
- data/spec/dummy/db/migrate/20161113032308_create_purchases.rb +1 -1
- data/spec/dummy/db/migrate/20211006145358_add_payment_method_to_purchase.rb +5 -0
- data/spec/dummy/db/migrate/20211103114451_add_shipping_to_purchase.rb +5 -0
- data/spec/dummy/db/migrate/20211103114830_add_store_to_purchase.rb +5 -0
- data/spec/dummy/db/schema.rb +17 -17
- data/spec/dummy/public/404.html +6 -6
- data/spec/dummy/public/422.html +6 -6
- data/spec/dummy/public/500.html +6 -6
- data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/spec/factories/purchases.rb +9 -22
- data/spec/dummy/spec/lib/active_record_extension_spec.rb +81 -33
- metadata +104 -38
- data/.hound.yml +0 -4
- data/.travis.yml +0 -15
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/secrets.yml +0 -22
data/.rubocop.yml
CHANGED
@@ -1,35 +1,14 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-rails
|
1
3
|
AllCops:
|
2
|
-
Include:
|
3
|
-
- "**/*.rake"
|
4
|
-
- "**/Gemfile"
|
5
|
-
- "**/Rakefile"
|
6
4
|
Exclude:
|
7
5
|
- "vendor/**/*"
|
8
6
|
- "db/**/*"
|
9
7
|
- "bin/**/*"
|
10
|
-
|
11
|
-
|
12
|
-
TargetRubyVersion: 2.3
|
13
|
-
Layout/AccessModifierIndentation:
|
14
|
-
Description: Check indentation of private/protected visibility modifiers.
|
15
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
|
8
|
+
TargetRubyVersion: 2.7
|
9
|
+
Rails:
|
16
10
|
Enabled: true
|
17
|
-
|
18
|
-
SupportedStyles:
|
19
|
-
- outdent
|
20
|
-
- indent
|
21
|
-
Layout/AlignHash:
|
22
|
-
Description: Align the elements of a hash literal if they span more than one line.
|
23
|
-
Enabled: true
|
24
|
-
EnforcedHashRocketStyle: key
|
25
|
-
EnforcedColonStyle: key
|
26
|
-
EnforcedLastArgumentHashStyle: always_inspect
|
27
|
-
SupportedLastArgumentHashStyles:
|
28
|
-
- always_inspect
|
29
|
-
- always_ignore
|
30
|
-
- ignore_implicit
|
31
|
-
- ignore_explicit
|
32
|
-
Layout/AlignParameters:
|
11
|
+
Layout/ParameterAlignment:
|
33
12
|
Description: Align the parameters of a method call if they span more than one line.
|
34
13
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
|
35
14
|
Enabled: true
|
@@ -37,41 +16,8 @@ Layout/AlignParameters:
|
|
37
16
|
SupportedStyles:
|
38
17
|
- with_first_parameter
|
39
18
|
- with_fixed_indentation
|
40
|
-
Style/AndOr:
|
41
|
-
Description: Use &&/|| instead of and/or.
|
42
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
|
43
|
-
Enabled: true
|
44
|
-
EnforcedStyle: always
|
45
|
-
SupportedStyles:
|
46
|
-
- always
|
47
|
-
- conditionals
|
48
|
-
Style/BarePercentLiterals:
|
49
|
-
Description: Checks if usage of %() or %Q() matches configuration.
|
50
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
|
51
|
-
Enabled: true
|
52
|
-
EnforcedStyle: bare_percent
|
53
|
-
SupportedStyles:
|
54
|
-
- percent_q
|
55
|
-
- bare_percent
|
56
19
|
Metrics/BlockLength:
|
57
20
|
Enabled: false
|
58
|
-
Style/BracesAroundHashParameters:
|
59
|
-
Description: Enforce braces style around hash parameters.
|
60
|
-
Enabled: true
|
61
|
-
EnforcedStyle: no_braces
|
62
|
-
SupportedStyles:
|
63
|
-
- braces
|
64
|
-
- no_braces
|
65
|
-
- context_dependent
|
66
|
-
Layout/CaseIndentation:
|
67
|
-
Description: Indentation of when in a case/when/[else/]end.
|
68
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
|
69
|
-
Enabled: true
|
70
|
-
EnforcedStyle: case
|
71
|
-
SupportedStyles:
|
72
|
-
- case
|
73
|
-
- end
|
74
|
-
IndentOneStep: false
|
75
21
|
Style/ClassAndModuleChildren:
|
76
22
|
Description: Checks style of children classes and modules.
|
77
23
|
Enabled: false
|
@@ -79,24 +25,6 @@ Style/ClassAndModuleChildren:
|
|
79
25
|
SupportedStyles:
|
80
26
|
- nested
|
81
27
|
- compact
|
82
|
-
Style/ClassCheck:
|
83
|
-
Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
|
84
|
-
Enabled: true
|
85
|
-
EnforcedStyle: is_a?
|
86
|
-
SupportedStyles:
|
87
|
-
- is_a?
|
88
|
-
- kind_of?
|
89
|
-
Style/CollectionMethods:
|
90
|
-
Description: Preferred collection methods.
|
91
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
92
|
-
Enabled: false
|
93
|
-
PreferredMethods:
|
94
|
-
collect: map
|
95
|
-
collect!: map!
|
96
|
-
inject: reduce
|
97
|
-
detect: find
|
98
|
-
find_all: select
|
99
|
-
find: detect
|
100
28
|
Style/CommentAnnotation:
|
101
29
|
Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
|
102
30
|
REVIEW).
|
@@ -108,69 +36,11 @@ Style/CommentAnnotation:
|
|
108
36
|
- OPTIMIZE
|
109
37
|
- HACK
|
110
38
|
- REVIEW
|
111
|
-
|
112
|
-
Description: Checks the position of the dot in multi-line method calls.
|
113
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
114
|
-
Enabled: true
|
115
|
-
EnforcedStyle: leading
|
116
|
-
SupportedStyles:
|
117
|
-
- leading
|
118
|
-
- trailing
|
119
|
-
Layout/EmptyLineBetweenDefs:
|
120
|
-
Description: Use empty lines between defs.
|
121
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
|
122
|
-
Enabled: true
|
123
|
-
AllowAdjacentOneLineDefs: false
|
124
|
-
Layout/EmptyLinesAroundBlockBody:
|
125
|
-
Description: Keeps track of empty lines around block bodies.
|
126
|
-
Enabled: true
|
127
|
-
EnforcedStyle: no_empty_lines
|
128
|
-
SupportedStyles:
|
129
|
-
- empty_lines
|
130
|
-
- no_empty_lines
|
131
|
-
Layout/EmptyLinesAroundClassBody:
|
132
|
-
Description: Keeps track of empty lines around class bodies.
|
133
|
-
Enabled: true
|
134
|
-
EnforcedStyle: no_empty_lines
|
135
|
-
SupportedStyles:
|
136
|
-
- empty_lines
|
137
|
-
- no_empty_lines
|
138
|
-
Layout/EmptyLinesAroundModuleBody:
|
139
|
-
Description: Keeps track of empty lines around module bodies.
|
140
|
-
Enabled: true
|
141
|
-
EnforcedStyle: no_empty_lines
|
142
|
-
SupportedStyles:
|
143
|
-
- empty_lines
|
144
|
-
- no_empty_lines
|
145
|
-
Style/Encoding:
|
146
|
-
Description: Use UTF-8 as the source file encoding.
|
147
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
|
148
|
-
Enabled: false
|
149
|
-
EnforcedStyle: always
|
150
|
-
SupportedStyles:
|
151
|
-
- when_needed
|
152
|
-
- always
|
153
|
-
Style/FileName:
|
39
|
+
Naming/FileName:
|
154
40
|
Description: Use snake_case for source file names.
|
155
41
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
156
42
|
Enabled: false
|
157
43
|
Exclude: []
|
158
|
-
Layout/FirstParameterIndentation:
|
159
|
-
Description: Checks the indentation of the first parameter in a method call.
|
160
|
-
Enabled: true
|
161
|
-
EnforcedStyle: special_for_inner_method_call_in_parentheses
|
162
|
-
SupportedStyles:
|
163
|
-
- consistent
|
164
|
-
- special_for_inner_method_call
|
165
|
-
- special_for_inner_method_call_in_parentheses
|
166
|
-
Style/For:
|
167
|
-
Description: Checks use of for or each in multiline loops.
|
168
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
|
169
|
-
Enabled: true
|
170
|
-
EnforcedStyle: each
|
171
|
-
SupportedStyles:
|
172
|
-
- for
|
173
|
-
- each
|
174
44
|
Style/FormatString:
|
175
45
|
Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
|
176
46
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
|
@@ -192,32 +62,10 @@ Style/GuardClause:
|
|
192
62
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
193
63
|
Enabled: false
|
194
64
|
MinBodyLength: 1
|
195
|
-
Style/HashSyntax:
|
196
|
-
Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
|
197
|
-
1, :b => 2 }.'
|
198
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
|
199
|
-
Enabled: true
|
200
|
-
EnforcedStyle: ruby19
|
201
|
-
SupportedStyles:
|
202
|
-
- ruby19
|
203
|
-
- hash_rockets
|
204
65
|
Style/IfUnlessModifier:
|
205
66
|
Description: Favor modifier if/unless usage when you have a single-line body.
|
206
67
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
207
68
|
Enabled: false
|
208
|
-
MaxLineLength: 80
|
209
|
-
Layout/IndentationWidth:
|
210
|
-
Description: Use 2 spaces for indentation.
|
211
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
212
|
-
Enabled: true
|
213
|
-
Width: 2
|
214
|
-
Layout/IndentHash:
|
215
|
-
Description: Checks the indentation of the first key in a hash literal.
|
216
|
-
Enabled: true
|
217
|
-
EnforcedStyle: special_inside_parentheses
|
218
|
-
SupportedStyles:
|
219
|
-
- special_inside_parentheses
|
220
|
-
- consistent
|
221
69
|
Style/LambdaCall:
|
222
70
|
Description: Use lambda.call(...) instead of lambda.(...).
|
223
71
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
|
@@ -235,27 +83,6 @@ Style/Next:
|
|
235
83
|
SupportedStyles:
|
236
84
|
- skip_modifier_ifs
|
237
85
|
- always
|
238
|
-
Style/NonNilCheck:
|
239
|
-
Description: Checks for redundant nil checks.
|
240
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
|
241
|
-
Enabled: true
|
242
|
-
IncludeSemanticChanges: false
|
243
|
-
Style/MethodDefParentheses:
|
244
|
-
Description: Checks if the method definitions have or don't have parentheses.
|
245
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
246
|
-
Enabled: true
|
247
|
-
EnforcedStyle: require_parentheses
|
248
|
-
SupportedStyles:
|
249
|
-
- require_parentheses
|
250
|
-
- require_no_parentheses
|
251
|
-
Style/MethodName:
|
252
|
-
Description: Use the configured style when naming methods.
|
253
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
254
|
-
Enabled: true
|
255
|
-
EnforcedStyle: snake_case
|
256
|
-
SupportedStyles:
|
257
|
-
- snake_case
|
258
|
-
- camelCase
|
259
86
|
Layout/MultilineOperationIndentation:
|
260
87
|
Description: Checks indentation of binary operations that span more than one line.
|
261
88
|
Enabled: true
|
@@ -271,11 +98,6 @@ Style/NumericLiterals:
|
|
271
98
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
|
272
99
|
Enabled: false
|
273
100
|
MinDigits: 5
|
274
|
-
Style/ParenthesesAroundCondition:
|
275
|
-
Description: Don't use parentheses around the condition of an if/unless/while.
|
276
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
|
277
|
-
Enabled: true
|
278
|
-
AllowSafeAssignment: true
|
279
101
|
Style/PercentLiteralDelimiters:
|
280
102
|
Description: Use `%`-literal delimiters consistently
|
281
103
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
@@ -290,14 +112,7 @@ Style/PercentLiteralDelimiters:
|
|
290
112
|
"%w": "()"
|
291
113
|
"%W": "()"
|
292
114
|
"%x": "()"
|
293
|
-
|
294
|
-
Description: Checks if uses of %Q/%q match the configured preference.
|
295
|
-
Enabled: true
|
296
|
-
EnforcedStyle: lower_case_q
|
297
|
-
SupportedStyles:
|
298
|
-
- lower_case_q
|
299
|
-
- upper_case_q
|
300
|
-
Style/PredicateName:
|
115
|
+
Naming/PredicateName:
|
301
116
|
Description: Check the names of predicate methods.
|
302
117
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
303
118
|
Enabled: true
|
@@ -305,7 +120,7 @@ Style/PredicateName:
|
|
305
120
|
- is_
|
306
121
|
- has_
|
307
122
|
- have_
|
308
|
-
|
123
|
+
ForbiddenPrefixes:
|
309
124
|
- is_
|
310
125
|
Style/RaiseArgs:
|
311
126
|
Description: Checks the arguments passed to raise/fail.
|
@@ -315,16 +130,6 @@ Style/RaiseArgs:
|
|
315
130
|
SupportedStyles:
|
316
131
|
- compact
|
317
132
|
- exploded
|
318
|
-
Style/RedundantReturn:
|
319
|
-
Description: Don't use return where it's not required.
|
320
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
|
321
|
-
Enabled: true
|
322
|
-
AllowMultipleReturnValues: false
|
323
|
-
Style/Semicolon:
|
324
|
-
Description: Don't use semicolons to terminate expressions.
|
325
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
|
326
|
-
Enabled: true
|
327
|
-
AllowAsExpressionSeparator: false
|
328
133
|
Style/SignalException:
|
329
134
|
Description: Checks for proper usage of fail and raise.
|
330
135
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
@@ -334,17 +139,6 @@ Style/SignalException:
|
|
334
139
|
- only_raise
|
335
140
|
- only_fail
|
336
141
|
- semantic
|
337
|
-
Style/SingleLineBlockParams:
|
338
|
-
Description: Enforces the names of some block params.
|
339
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
|
340
|
-
Enabled: false
|
341
|
-
Methods:
|
342
|
-
- reduce:
|
343
|
-
- a
|
344
|
-
- e
|
345
|
-
- inject:
|
346
|
-
- a
|
347
|
-
- e
|
348
142
|
Style/SingleLineMethods:
|
349
143
|
Description: Avoid single-line methods.
|
350
144
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
@@ -358,77 +152,17 @@ Style/StringLiterals:
|
|
358
152
|
SupportedStyles:
|
359
153
|
- single_quotes
|
360
154
|
- double_quotes
|
361
|
-
Style/StringLiteralsInInterpolation:
|
362
|
-
Description: Checks if uses of quotes inside expressions in interpolated strings
|
363
|
-
match the configured preference.
|
364
|
-
Enabled: true
|
365
|
-
EnforcedStyle: single_quotes
|
366
|
-
SupportedStyles:
|
367
|
-
- single_quotes
|
368
|
-
- double_quotes
|
369
|
-
Layout/SpaceAroundBlockParameters:
|
370
|
-
Description: Checks the spacing inside and after block parameters pipes.
|
371
|
-
Enabled: true
|
372
|
-
EnforcedStyleInsidePipes: no_space
|
373
|
-
SupportedStylesInsidePipes:
|
374
|
-
- space
|
375
|
-
- no_space
|
376
|
-
Layout/SpaceAroundEqualsInParameterDefault:
|
377
|
-
Description: Checks that the equals signs in parameter default assignments have
|
378
|
-
or don't have surrounding space depending on configuration.
|
379
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
|
380
|
-
Enabled: true
|
381
|
-
EnforcedStyle: space
|
382
|
-
SupportedStyles:
|
383
|
-
- space
|
384
|
-
- no_space
|
385
|
-
Layout/SpaceBeforeBlockBraces:
|
386
|
-
Description: Checks that the left block brace has or doesn't have space before it.
|
387
|
-
Enabled: true
|
388
|
-
EnforcedStyle: space
|
389
|
-
SupportedStyles:
|
390
|
-
- space
|
391
|
-
- no_space
|
392
|
-
Layout/SpaceInsideBlockBraces:
|
393
|
-
Description: Checks that block braces have or don't have surrounding space. For
|
394
|
-
blocks taking parameters, checks that the left brace has or doesn't have trailing
|
395
|
-
space.
|
396
|
-
Enabled: true
|
397
|
-
EnforcedStyle: space
|
398
|
-
SupportedStyles:
|
399
|
-
- space
|
400
|
-
- no_space
|
401
|
-
EnforcedStyleForEmptyBraces: no_space
|
402
|
-
SpaceBeforeBlockParameters: true
|
403
|
-
Layout/SpaceInsideHashLiteralBraces:
|
404
|
-
Description: Use spaces inside hash literal braces - or don't.
|
405
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
406
|
-
Enabled: true
|
407
|
-
EnforcedStyle: space
|
408
|
-
EnforcedStyleForEmptyBraces: no_space
|
409
|
-
SupportedStyles:
|
410
|
-
- space
|
411
|
-
- no_space
|
412
|
-
Style/SymbolProc:
|
413
|
-
Description: Use symbols as procs instead of blocks when possible.
|
414
|
-
Enabled: true
|
415
|
-
IgnoredMethods:
|
416
|
-
- respond_to
|
417
|
-
Layout/TrailingBlankLines:
|
418
|
-
Description: Checks trailing blank lines and final newline.
|
419
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
|
420
|
-
Enabled: true
|
421
|
-
EnforcedStyle: final_newline
|
422
|
-
SupportedStyles:
|
423
|
-
- final_newline
|
424
|
-
- final_blank_line
|
425
155
|
Style/TrailingCommaInArguments:
|
426
156
|
Description: Checks for trailing comma in argument lists.
|
427
157
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
428
158
|
Enabled: true
|
429
|
-
Style/
|
159
|
+
Style/TrailingCommaInArrayLiteral:
|
430
160
|
Description: Checks for trailing comma in array and hash literals.
|
431
|
-
StyleGuide: https://github.com/
|
161
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#no-trailing-array-commas
|
162
|
+
Enabled: true
|
163
|
+
Style/TrailingCommaInHashLiteral:
|
164
|
+
Description: Checks for trailing comma in array and hash literals.
|
165
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#no-trailing-array-commas
|
432
166
|
Enabled: true
|
433
167
|
Style/TrivialAccessors:
|
434
168
|
Description: Prefer attr_* methods to trivial readers/writers.
|
@@ -437,7 +171,7 @@ Style/TrivialAccessors:
|
|
437
171
|
ExactNameMatch: false
|
438
172
|
AllowPredicates: false
|
439
173
|
AllowDSLWriters: false
|
440
|
-
|
174
|
+
AllowedMethods:
|
441
175
|
- to_ary
|
442
176
|
- to_a
|
443
177
|
- to_c
|
@@ -455,25 +189,27 @@ Style/TrivialAccessors:
|
|
455
189
|
- to_str
|
456
190
|
- to_s
|
457
191
|
- to_sym
|
458
|
-
Style/VariableName:
|
459
|
-
Description: Use the configured style when naming variables.
|
460
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
461
|
-
Enabled: true
|
462
|
-
EnforcedStyle: snake_case
|
463
|
-
SupportedStyles:
|
464
|
-
- snake_case
|
465
|
-
- camelCase
|
466
192
|
Style/WhileUntilModifier:
|
467
193
|
Description: Favor modifier while/until usage when you have a single-line body.
|
468
194
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
|
469
195
|
Enabled: false
|
470
|
-
MaxLineLength: 80
|
471
196
|
Style/WordArray:
|
472
197
|
Description: Use %w or %W for arrays of words.
|
473
198
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
|
474
199
|
Enabled: false
|
475
200
|
MinSize: 0
|
476
201
|
WordRegex: !ruby/regexp /\A[\p{Word}]+\z/
|
202
|
+
Style/ExponentialNotation:
|
203
|
+
Enabled: true
|
204
|
+
Style/HashEachMethods:
|
205
|
+
Description: Use Hash#each_key and Hash#each_value.
|
206
|
+
Enabled: true
|
207
|
+
Style/HashTransformKeys:
|
208
|
+
Description: Prefer `transform_keys` over `each_with_object` and `map`.
|
209
|
+
Enabled: true
|
210
|
+
Style/HashTransformValues:
|
211
|
+
Description: Prefer `transform_values` over `each_with_object` and `map`.
|
212
|
+
Enabled: true
|
477
213
|
Metrics/AbcSize:
|
478
214
|
Description: A calculated magnitude based on number of assignments, branches, and
|
479
215
|
conditions.
|
@@ -489,20 +225,6 @@ Metrics/ClassLength:
|
|
489
225
|
Enabled: false
|
490
226
|
CountComments: false
|
491
227
|
Max: 100
|
492
|
-
Metrics/CyclomaticComplexity:
|
493
|
-
Description: A complexity metric that is strongly correlated to the number of test
|
494
|
-
cases needed to validate a method.
|
495
|
-
Enabled: true
|
496
|
-
Max: 6
|
497
|
-
Metrics/LineLength:
|
498
|
-
Description: Limit lines to 100 characters.
|
499
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#100-character-limits
|
500
|
-
Enabled: true
|
501
|
-
Max: 100
|
502
|
-
AllowURI: true
|
503
|
-
URISchemes:
|
504
|
-
- http
|
505
|
-
- https
|
506
228
|
Metrics/MethodLength:
|
507
229
|
Description: Avoid methods longer than 15 lines of code.
|
508
230
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
@@ -517,74 +239,37 @@ Metrics/ParameterLists:
|
|
517
239
|
Enabled: false
|
518
240
|
Max: 5
|
519
241
|
CountKeywordArgs: true
|
520
|
-
Metrics/PerceivedComplexity:
|
521
|
-
Description: A complexity metric geared towards measuring complexity for a human
|
522
|
-
reader.
|
523
|
-
Enabled: true
|
524
|
-
Max: 7
|
525
242
|
Lint/AssignmentInCondition:
|
526
243
|
Description: Don't use assignment in conditions.
|
527
244
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
528
245
|
Enabled: false
|
529
246
|
AllowSafeAssignment: true
|
530
|
-
|
247
|
+
Layout/LineLength:
|
248
|
+
Description: Limit lines to 100 characters.
|
249
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#100-character-limits
|
250
|
+
Enabled: true
|
251
|
+
Max: 100
|
252
|
+
AllowURI: true
|
253
|
+
URISchemes:
|
254
|
+
- http
|
255
|
+
- https
|
256
|
+
Layout/EndAlignment:
|
531
257
|
Description: Align ends correctly.
|
532
258
|
Enabled: true
|
533
259
|
EnforcedStyleAlignWith: keyword
|
534
260
|
SupportedStylesAlignWith:
|
535
261
|
- keyword
|
536
262
|
- variable
|
537
|
-
|
263
|
+
Layout/DefEndAlignment:
|
538
264
|
Description: Align ends corresponding to defs correctly.
|
539
265
|
Enabled: true
|
540
266
|
EnforcedStyleAlignWith: start_of_line
|
541
267
|
SupportedStylesAlignWith:
|
542
268
|
- start_of_line
|
543
269
|
- def
|
544
|
-
|
545
|
-
Description:
|
546
|
-
Enabled: true
|
547
|
-
EnforcedStyle: action
|
548
|
-
SupportedStyles:
|
549
|
-
- action
|
550
|
-
- filter
|
551
|
-
Include:
|
552
|
-
- app/controllers/**/*.rb
|
553
|
-
Rails/HasAndBelongsToMany:
|
554
|
-
Description: Prefer has_many :through to has_and_belongs_to_many.
|
555
|
-
Enabled: true
|
556
|
-
Include:
|
557
|
-
- app/models/**/*.rb
|
558
|
-
Rails/Output:
|
559
|
-
Description: Checks for calls to puts, print, etc.
|
560
|
-
Enabled: true
|
561
|
-
Include:
|
562
|
-
- app/**/*.rb
|
563
|
-
- config/**/*.rb
|
564
|
-
- db/**/*.rb
|
565
|
-
- lib/**/*.rb
|
566
|
-
Rails/ReadWriteAttribute:
|
567
|
-
Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
|
568
|
-
Enabled: true
|
569
|
-
Include:
|
570
|
-
- app/models/**/*.rb
|
571
|
-
Rails/ScopeArgs:
|
572
|
-
Description: Checks the arguments of ActiveRecord scopes.
|
573
|
-
Enabled: true
|
574
|
-
Include:
|
575
|
-
- app/models/**/*.rb
|
576
|
-
Rails/Validation:
|
577
|
-
Description: Use validates :attribute, hash of validations.
|
270
|
+
Layout/SpaceAroundMethodCallOperator:
|
271
|
+
Description: Checks method call operators to not have spaces around them.
|
578
272
|
Enabled: true
|
579
|
-
Include:
|
580
|
-
- app/models/**/*.rb
|
581
|
-
Style/InlineComment:
|
582
|
-
Description: Avoid inline comments.
|
583
|
-
Enabled: false
|
584
|
-
Style/MethodCalledOnDoEndBlock:
|
585
|
-
Description: Avoid chaining a method call on a do...end block.
|
586
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
587
|
-
Enabled: false
|
588
273
|
Style/SymbolArray:
|
589
274
|
Description: Use %i or %I for arrays of symbols.
|
590
275
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
|
@@ -592,17 +277,13 @@ Style/SymbolArray:
|
|
592
277
|
Layout/ExtraSpacing:
|
593
278
|
Description: Do not use unnecessary spacing.
|
594
279
|
Enabled: false
|
595
|
-
|
280
|
+
Naming/AccessorMethodName:
|
596
281
|
Description: Check the naming of accessor methods for get_/set_.
|
597
282
|
Enabled: false
|
598
283
|
Style/Alias:
|
599
284
|
Description: Use alias_method instead of alias.
|
600
285
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
601
286
|
Enabled: false
|
602
|
-
Layout/AlignArray:
|
603
|
-
Description: Align the elements of an array literal if they span more than one line.
|
604
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
|
605
|
-
Enabled: true
|
606
287
|
Style/ArrayJoin:
|
607
288
|
Description: Use Array#join instead of Array#*.
|
608
289
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
|
@@ -611,7 +292,7 @@ Style/AsciiComments:
|
|
611
292
|
Description: Use only ascii symbols in comments.
|
612
293
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
|
613
294
|
Enabled: false
|
614
|
-
|
295
|
+
Naming/AsciiIdentifiers:
|
615
296
|
Description: Use only ascii symbols in identifiers.
|
616
297
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
|
617
298
|
Enabled: false
|
@@ -619,17 +300,10 @@ Style/Attr:
|
|
619
300
|
Description: Checks for uses of Module#attr.
|
620
301
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
|
621
302
|
Enabled: false
|
622
|
-
Style/BeginBlock:
|
623
|
-
Description: Avoid the use of BEGIN blocks.
|
624
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
|
625
|
-
Enabled: true
|
626
303
|
Style/BlockComments:
|
627
304
|
Description: Do not use block comments.
|
628
305
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
|
629
306
|
Enabled: false
|
630
|
-
Layout/BlockEndNewline:
|
631
|
-
Description: Put end statement of multiline block on its own line.
|
632
|
-
Enabled: true
|
633
307
|
Style/CaseEquality:
|
634
308
|
Description: Avoid explicit use of the case equality operator(===).
|
635
309
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
|
@@ -638,14 +312,6 @@ Style/CharacterLiteral:
|
|
638
312
|
Description: Checks for uses of character literals.
|
639
313
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
|
640
314
|
Enabled: false
|
641
|
-
Style/ClassAndModuleCamelCase:
|
642
|
-
Description: Use CamelCase for classes and modules.
|
643
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
|
644
|
-
Enabled: true
|
645
|
-
Style/ClassMethods:
|
646
|
-
Description: Use self when defining module/class methods.
|
647
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-singletons
|
648
|
-
Enabled: true
|
649
315
|
Style/ClassVars:
|
650
316
|
Description: Avoid the use of class variables.
|
651
317
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
|
@@ -654,17 +320,6 @@ Style/ColonMethodCall:
|
|
654
320
|
Description: 'Do not use :: for method call.'
|
655
321
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
|
656
322
|
Enabled: false
|
657
|
-
Layout/CommentIndentation:
|
658
|
-
Description: Indentation of comments.
|
659
|
-
Enabled: true
|
660
|
-
Style/ConstantName:
|
661
|
-
Description: Constants should use SCREAMING_SNAKE_CASE.
|
662
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
|
663
|
-
Enabled: true
|
664
|
-
Style/DefWithParentheses:
|
665
|
-
Description: Use def with parentheses when there are arguments.
|
666
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
667
|
-
Enabled: true
|
668
323
|
Style/PreferredHashMethods:
|
669
324
|
Description: Checks for use of deprecated Hash methods.
|
670
325
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
|
@@ -679,29 +334,13 @@ Style/DoubleNegation:
|
|
679
334
|
Style/EachWithObject:
|
680
335
|
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
681
336
|
Enabled: false
|
682
|
-
Layout/ElseAlignment:
|
683
|
-
Description: Align elses and elsifs correctly.
|
684
|
-
Enabled: true
|
685
337
|
Style/EmptyElse:
|
686
338
|
Description: Avoid empty else-clauses.
|
687
339
|
Enabled: true
|
688
|
-
Layout/EmptyLines:
|
689
|
-
Description: Don't use several empty lines in a row.
|
690
|
-
Enabled: true
|
691
|
-
Layout/EmptyLinesAroundAccessModifier:
|
692
|
-
Description: Keep blank lines around access modifiers.
|
693
|
-
Enabled: true
|
694
|
-
Layout/EmptyLinesAroundMethodBody:
|
695
|
-
Description: Keeps track of empty lines around method bodies.
|
696
|
-
Enabled: true
|
697
340
|
Style/EmptyLiteral:
|
698
341
|
Description: Prefer literals to Array.new/Hash.new/String.new.
|
699
342
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
700
343
|
Enabled: false
|
701
|
-
Style/EndBlock:
|
702
|
-
Description: Avoid the use of END blocks.
|
703
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
|
704
|
-
Enabled: true
|
705
344
|
Layout/EndOfLine:
|
706
345
|
Description: Use Unix-style line endings.
|
707
346
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
|
@@ -710,7 +349,7 @@ Style/EvenOdd:
|
|
710
349
|
Description: Favor the use of Fixnum#even? && Fixnum#odd?
|
711
350
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
712
351
|
Enabled: false
|
713
|
-
|
352
|
+
Lint/FlipFlop:
|
714
353
|
Description: Checks for flip flops
|
715
354
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
|
716
355
|
Enabled: false
|
@@ -718,32 +357,14 @@ Style/IfWithSemicolon:
|
|
718
357
|
Description: Do not use if x; .... Use the ternary operator instead.
|
719
358
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
|
720
359
|
Enabled: false
|
721
|
-
Layout/IndentationConsistency:
|
722
|
-
Description: Keep indentation straight.
|
723
|
-
Enabled: true
|
724
|
-
Layout/IndentArray:
|
725
|
-
Description: Checks the indentation of the first element in an array literal.
|
726
|
-
Enabled: true
|
727
|
-
Style/InfiniteLoop:
|
728
|
-
Description: Use Kernel#loop for infinite loops.
|
729
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
|
730
|
-
Enabled: true
|
731
360
|
Style/Lambda:
|
732
361
|
Description: Use the new lambda literal syntax for single-line blocks.
|
733
362
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
|
734
363
|
Enabled: false
|
735
|
-
Layout/LeadingCommentSpace:
|
736
|
-
Description: Comments should start with a space.
|
737
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
|
738
|
-
Enabled: true
|
739
364
|
Style/LineEndConcatenation:
|
740
365
|
Description: Use \ instead of + or << to concatenate two string literals at line
|
741
366
|
end.
|
742
367
|
Enabled: false
|
743
|
-
Style/MethodCallWithoutArgsParentheses:
|
744
|
-
Description: Do not use parentheses for method calls with no arguments.
|
745
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
|
746
|
-
Enabled: true
|
747
368
|
Style/ModuleFunction:
|
748
369
|
Description: Checks for usage of `extend self` in modules.
|
749
370
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
@@ -755,14 +376,6 @@ Style/MultilineBlockChain:
|
|
755
376
|
Layout/MultilineBlockLayout:
|
756
377
|
Description: Ensures newlines after multiline block do statements.
|
757
378
|
Enabled: false
|
758
|
-
Style/MultilineIfThen:
|
759
|
-
Description: Do not use then for multi-line if/unless.
|
760
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
|
761
|
-
Enabled: true
|
762
|
-
Style/MultilineTernaryOperator:
|
763
|
-
Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
|
764
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
|
765
|
-
Enabled: true
|
766
379
|
Style/NegatedIf:
|
767
380
|
Description: Favor unless over if for negative conditions (or control flow or).
|
768
381
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
|
@@ -771,23 +384,15 @@ Style/NegatedWhile:
|
|
771
384
|
Description: Favor until over while for negative conditions.
|
772
385
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
|
773
386
|
Enabled: false
|
774
|
-
Style/NestedTernaryOperator:
|
775
|
-
Description: Use one expression per branch in a ternary operator.
|
776
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
|
777
|
-
Enabled: true
|
778
387
|
Style/NilComparison:
|
779
388
|
Description: Prefer x.nil? to x == nil.
|
780
389
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
781
390
|
Enabled: false
|
782
|
-
Style/Not:
|
783
|
-
Description: Use ! instead of not.
|
784
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
|
785
|
-
Enabled: true
|
786
391
|
Style/OneLineConditional:
|
787
392
|
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
788
393
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
789
394
|
Enabled: false
|
790
|
-
|
395
|
+
Naming/BinaryOperatorParameterName:
|
791
396
|
Description: When defining binary operators, name the argument other.
|
792
397
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
|
793
398
|
Enabled: false
|
@@ -799,107 +404,27 @@ Style/Proc:
|
|
799
404
|
Description: Use proc instead of Proc.new.
|
800
405
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
|
801
406
|
Enabled: false
|
802
|
-
Style/RedundantBegin:
|
803
|
-
Description: Don't use begin blocks when they are not needed.
|
804
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
|
805
|
-
Enabled: true
|
806
|
-
Style/RedundantException:
|
807
|
-
Description: Checks for an obsolete RuntimeException argument in raise/fail.
|
808
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
|
809
|
-
Enabled: true
|
810
|
-
Style/RedundantSelf:
|
811
|
-
Description: Don't use self where it's not needed.
|
812
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
|
813
|
-
Enabled: true
|
814
|
-
Style/RescueModifier:
|
815
|
-
Description: Avoid using rescue in its modifier form.
|
816
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
|
817
|
-
Enabled: true
|
818
407
|
Style/SelfAssignment:
|
819
408
|
Description: Checks for places where self-assignment shorthand should have been
|
820
409
|
used.
|
821
410
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
|
822
411
|
Enabled: false
|
823
|
-
Layout/SpaceAfterColon:
|
824
|
-
Description: Use spaces after colons.
|
825
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
826
|
-
Enabled: true
|
827
|
-
Layout/SpaceAfterComma:
|
828
|
-
Description: Use spaces after commas.
|
829
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
830
|
-
Enabled: true
|
831
|
-
Layout/SpaceAroundKeyword:
|
832
|
-
Description: Use a space around keywords if appropriate.
|
833
|
-
Enabled: true
|
834
|
-
Layout/SpaceAfterMethodName:
|
835
|
-
Description: Do not put a space between a method name and the opening parenthesis
|
836
|
-
in a method definition.
|
837
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
838
|
-
Enabled: true
|
839
|
-
Layout/SpaceAfterNot:
|
840
|
-
Description: Tracks redundant space after the ! operator.
|
841
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
|
842
|
-
Enabled: true
|
843
|
-
Layout/SpaceAfterSemicolon:
|
844
|
-
Description: Use spaces after semicolons.
|
845
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
846
|
-
Enabled: true
|
847
|
-
Layout/SpaceBeforeComma:
|
848
|
-
Description: No spaces before commas.
|
849
|
-
Enabled: true
|
850
|
-
Layout/SpaceBeforeComment:
|
851
|
-
Description: Checks for missing space between code and a comment on the same line.
|
852
|
-
Enabled: true
|
853
412
|
Layout/SpaceBeforeFirstArg:
|
854
413
|
Description: Put a space between a method name and the first argument in a method
|
855
414
|
call without parentheses.
|
856
415
|
Enabled: true
|
857
|
-
Layout/SpaceBeforeSemicolon:
|
858
|
-
Description: No spaces before semicolons.
|
859
|
-
Enabled: true
|
860
416
|
Layout/SpaceAroundOperators:
|
861
417
|
Description: Use spaces around operators.
|
862
418
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
863
419
|
Enabled: true
|
864
|
-
Layout/SpaceInsideBrackets:
|
865
|
-
Description: No spaces after [ or before ].
|
866
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
867
|
-
Enabled: true
|
868
420
|
Layout/SpaceInsideParens:
|
869
421
|
Description: No spaces after ( or before ).
|
870
422
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
871
423
|
Enabled: true
|
872
|
-
Layout/SpaceInsideRangeLiteral:
|
873
|
-
Description: No spaces inside range literals.
|
874
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
|
875
|
-
Enabled: true
|
876
424
|
Style/SpecialGlobalVars:
|
877
425
|
Description: Avoid Perl-style global variables.
|
878
426
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
879
427
|
Enabled: false
|
880
|
-
Style/StructInheritance:
|
881
|
-
Description: Checks for inheritance from Struct.new.
|
882
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
|
883
|
-
Enabled: true
|
884
|
-
Layout/Tab:
|
885
|
-
Description: No hard tabs.
|
886
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
887
|
-
Enabled: true
|
888
|
-
Layout/TrailingWhitespace:
|
889
|
-
Description: Avoid trailing whitespace.
|
890
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
|
891
|
-
Enabled: true
|
892
|
-
Style/UnlessElse:
|
893
|
-
Description: Do not use unless with else. Rewrite these with the positive case first.
|
894
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
|
895
|
-
Enabled: true
|
896
|
-
Style/UnneededCapitalW:
|
897
|
-
Description: Checks for %W when interpolation is not needed.
|
898
|
-
Enabled: true
|
899
|
-
Style/UnneededPercentQ:
|
900
|
-
Description: Checks for %q/%Q when single quotes or double quotes would do.
|
901
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
|
902
|
-
Enabled: true
|
903
428
|
Style/VariableInterpolation:
|
904
429
|
Description: Don't interpolate global, instance and class variables directly in
|
905
430
|
strings.
|
@@ -909,10 +434,6 @@ Style/WhenThen:
|
|
909
434
|
Description: Use when x then ... for one-line cases.
|
910
435
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
911
436
|
Enabled: false
|
912
|
-
Style/WhileUntilDo:
|
913
|
-
Description: Checks for redundant do after while or until.
|
914
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
|
915
|
-
Enabled: true
|
916
437
|
Lint/AmbiguousOperator:
|
917
438
|
Description: Checks for ambiguous operators in the first argument of a method invocation
|
918
439
|
without parentheses.
|
@@ -922,51 +443,25 @@ Lint/AmbiguousRegexpLiteral:
|
|
922
443
|
Description: Checks for ambiguous regexp literals in the first argument of a method
|
923
444
|
invocation without parenthesis.
|
924
445
|
Enabled: false
|
925
|
-
|
446
|
+
Layout/BlockAlignment:
|
926
447
|
Description: Align block ends correctly.
|
927
448
|
Enabled: true
|
928
|
-
|
449
|
+
Layout/ConditionPosition:
|
929
450
|
Description: Checks for condition placed in a confusing position relative to the
|
930
451
|
keyword.
|
931
452
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
|
932
453
|
Enabled: false
|
933
|
-
Lint/Debugger:
|
934
|
-
Description: Check for debugger calls.
|
935
|
-
Enabled: true
|
936
454
|
Lint/DeprecatedClassMethods:
|
937
455
|
Description: Check for deprecated class method calls.
|
938
456
|
Enabled: false
|
939
|
-
Lint/DuplicateMethods:
|
940
|
-
Description: Check for duplicate methods calls.
|
941
|
-
Enabled: true
|
942
457
|
Lint/ElseLayout:
|
943
458
|
Description: Check for odd code arrangement in an else block.
|
944
459
|
Enabled: false
|
945
|
-
Lint/
|
946
|
-
Description: Checks for empty ensure block.
|
947
|
-
Enabled: true
|
948
|
-
Lint/EmptyInterpolation:
|
949
|
-
Description: Checks for empty string interpolation.
|
950
|
-
Enabled: true
|
951
|
-
Lint/EndInMethod:
|
952
|
-
Description: END blocks should not be placed inside method definitions.
|
953
|
-
Enabled: true
|
954
|
-
Lint/EnsureReturn:
|
955
|
-
Description: Do not use return in an ensure block.
|
956
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
|
957
|
-
Enabled: true
|
958
|
-
Security/Eval:
|
959
|
-
Description: The use of eval represents a serious security risk.
|
960
|
-
Enabled: true
|
961
|
-
Lint/HandleExceptions:
|
460
|
+
Lint/SuppressedException:
|
962
461
|
Description: Don't suppress exception.
|
963
462
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
964
463
|
Enabled: false
|
965
|
-
Lint/
|
966
|
-
Description: Checks for invalid character literals with a non-escaped whitespace
|
967
|
-
character.
|
968
|
-
Enabled: false
|
969
|
-
Lint/LiteralInCondition:
|
464
|
+
Lint/LiteralAsCondition:
|
970
465
|
Description: Checks of literals used in conditions.
|
971
466
|
Enabled: false
|
972
467
|
Lint/LiteralInInterpolation:
|
@@ -984,55 +479,31 @@ Lint/ParenthesesAsGroupedExpression:
|
|
984
479
|
Lint/RequireParentheses:
|
985
480
|
Description: Use parentheses in the method call to avoid confusion about precedence.
|
986
481
|
Enabled: false
|
987
|
-
Lint/RescueException:
|
988
|
-
Description: Avoid rescuing the Exception class.
|
989
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
|
990
|
-
Enabled: true
|
991
|
-
Lint/ShadowingOuterLocalVariable:
|
992
|
-
Description: Do not use the same name as outer local variable for block arguments
|
993
|
-
or block local variables.
|
994
|
-
Enabled: true
|
995
|
-
Lint/StringConversionInInterpolation:
|
996
|
-
Description: Checks for Object#to_s usage in string interpolation.
|
997
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
|
998
|
-
Enabled: true
|
999
482
|
Lint/UnderscorePrefixedVariableName:
|
1000
483
|
Description: Do not use prefix `_` for a variable that is used.
|
1001
484
|
Enabled: false
|
1002
|
-
Lint/UnusedBlockArgument:
|
1003
|
-
Description: Checks for unused block arguments.
|
1004
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
1005
|
-
Enabled: true
|
1006
|
-
Lint/UnusedMethodArgument:
|
1007
|
-
Description: Checks for unused method arguments.
|
1008
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
1009
|
-
Enabled: true
|
1010
|
-
Lint/UnreachableCode:
|
1011
|
-
Description: Unreachable code.
|
1012
|
-
Enabled: true
|
1013
|
-
Lint/UselessAccessModifier:
|
1014
|
-
Description: Checks for useless access modifiers.
|
1015
|
-
Enabled: true
|
1016
|
-
Lint/UselessAssignment:
|
1017
|
-
Description: Checks for useless assignment to a local variable.
|
1018
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
1019
|
-
Enabled: true
|
1020
|
-
Lint/UselessComparison:
|
1021
|
-
Description: Checks for comparison of something with itself.
|
1022
|
-
Enabled: true
|
1023
|
-
Lint/UselessElseWithoutRescue:
|
1024
|
-
Description: Checks for useless `else` in `begin..end` without `rescue`.
|
1025
|
-
Enabled: true
|
1026
|
-
Lint/UselessSetterCall:
|
1027
|
-
Description: Checks for useless setter call to a local variable.
|
1028
|
-
Enabled: true
|
1029
485
|
Lint/Void:
|
1030
486
|
Description: Possible use of operator/literal/variable in void context.
|
1031
487
|
Enabled: false
|
488
|
+
Lint/RaiseException:
|
489
|
+
Description: Checks for `raise` or `fail` statements which are raising `Exception` class.
|
490
|
+
Enabled: true
|
491
|
+
Lint/StructNewOverride:
|
492
|
+
Description: Disallow overriding the `Struct` built-in methods via `Struct.new`.
|
493
|
+
Enabled: true
|
1032
494
|
Rails/Delegate:
|
1033
495
|
Description: Prefer delegate method for delegations.
|
1034
496
|
Enabled: false
|
1035
|
-
|
1036
|
-
Description: Use
|
1037
|
-
|
497
|
+
Style/OptionalBooleanParameter:
|
498
|
+
Description: 'Use keyword arguments when defining method with boolean argument.'
|
499
|
+
Enabled: false
|
500
|
+
Lint/MissingSuper:
|
501
|
+
Description: >-
|
502
|
+
This cop checks for the presence of constructors and lifecycle callbacks
|
503
|
+
without calls to `super`'.
|
1038
504
|
Enabled: false
|
505
|
+
Style/RedundantFileExtensionInRequire:
|
506
|
+
Description: >-
|
507
|
+
Checks for the presence of superfluous `.rb` extension in
|
508
|
+
the filename provided to `require` and `require_relative`.
|
509
|
+
Enabled: false
|