rmagick 5.5.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.rubocop_todo.yml CHANGED
@@ -1,36 +1,35 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-10-10 21:34:21 +0900 using RuboCop version 0.81.0.
3
+ # on 2024-04-18 19:59:34 UTC using RuboCop version 1.63.2.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 9
10
- # Configuration parameters: Include, IgnoredGems.
9
+ # Offense count: 11
10
+ # Configuration parameters: Include, IgnoredGems, OnlyFor.
11
11
  # Include: **/*.gemfile, **/Gemfile, **/gems.rb
12
12
  Bundler/GemComment:
13
13
  Exclude:
14
14
  - 'Gemfile'
15
15
 
16
16
  # Offense count: 1
17
- # Cop supports --auto-correct.
18
- # Configuration parameters: TreatCommentsAsGroupSeparators, Include.
19
- # Include: **/*.gemfile, **/Gemfile, **/gems.rb
20
- Bundler/OrderedGems:
17
+ # This cop supports safe autocorrection (--autocorrect).
18
+ # Configuration parameters: Severity, Include.
19
+ # Include: **/*.gemspec
20
+ Gemspec/RequireMFA:
21
21
  Exclude:
22
- - 'Gemfile'
22
+ - 'rmagick.gemspec'
23
23
 
24
24
  # Offense count: 1
25
- # Cop supports --auto-correct.
26
- # Configuration parameters: TreatCommentsAsGroupSeparators, Include.
25
+ # Configuration parameters: Severity, Include.
27
26
  # Include: **/*.gemspec
28
- Gemspec/OrderedDependencies:
27
+ Gemspec/RequiredRubyVersion:
29
28
  Exclude:
30
29
  - 'rmagick.gemspec'
31
30
 
32
- # Offense count: 12
33
- # Cop supports --auto-correct.
31
+ # Offense count: 11
32
+ # This cop supports unsafe autocorrection (--autocorrect-all).
34
33
  # Configuration parameters: Categories, ExpectedOrder.
35
34
  # ExpectedOrder: module_inclusion, constants, public_class_methods, initializer, public_methods, protected_methods, private_methods
36
35
  Layout/ClassStructure:
@@ -42,8 +41,19 @@ Layout/ClassStructure:
42
41
  - 'lib/rvg/pathdata.rb'
43
42
  - 'lib/rvg/rvg.rb'
44
43
 
45
- # Offense count: 2312
46
- # Cop supports --auto-correct.
44
+ # Offense count: 6
45
+ # This cop supports safe autocorrection (--autocorrect).
46
+ # Configuration parameters: AllowMultilineFinalElement.
47
+ Layout/FirstMethodArgumentLineBreak:
48
+ Exclude:
49
+ - 'doc/ex/arcpath.rb'
50
+ - 'doc/ex/evenodd.rb'
51
+ - 'doc/ex/get_type_metrics.rb'
52
+ - 'doc/ex/nonzero.rb'
53
+
54
+ # Offense count: 2311
55
+ # This cop supports safe autocorrection (--autocorrect).
56
+ # Configuration parameters: AllowMultilineFinalElement.
47
57
  Layout/MultilineArrayLineBreaks:
48
58
  Exclude:
49
59
  - 'doc/ex/add_noise.rb'
@@ -56,7 +66,8 @@ Layout/MultilineArrayLineBreaks:
56
66
  - 'lib/rvg/stylable.rb'
57
67
 
58
68
  # Offense count: 192
59
- # Cop supports --auto-correct.
69
+ # This cop supports safe autocorrection (--autocorrect).
70
+ # Configuration parameters: AllowMultilineFinalElement.
60
71
  Layout/MultilineMethodArgumentLineBreaks:
61
72
  Exclude:
62
73
  - 'doc/ex/axes.rb'
@@ -70,25 +81,109 @@ Layout/MultilineMethodArgumentLineBreaks:
70
81
  - 'examples/vignette.rb'
71
82
  - 'lib/rmagick_internal.rb'
72
83
 
84
+ # Offense count: 66
85
+ # This cop supports safe autocorrection (--autocorrect).
86
+ # Configuration parameters: InspectBlocks.
87
+ Layout/RedundantLineBreak:
88
+ Enabled: false
89
+
90
+ # Offense count: 1905
91
+ # This cop supports safe autocorrection (--autocorrect).
92
+ Layout/SingleLineBlockChain:
93
+ Enabled: false
94
+
73
95
  # Offense count: 1
74
- # Cop supports --auto-correct.
75
- # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
96
+ # This cop supports safe autocorrection (--autocorrect).
97
+ # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator, EnforcedStyleForRationalLiterals.
76
98
  # SupportedStylesForExponentOperator: space, no_space
99
+ # SupportedStylesForRationalLiterals: space, no_space
77
100
  Layout/SpaceAroundOperators:
78
101
  Exclude:
79
- - 'rmagick.gemspec'
102
+ - 'lib/rvg/misc.rb'
103
+
104
+ # Offense count: 1
105
+ # This cop supports safe autocorrection (--autocorrect).
106
+ Layout/SpaceBeforeBrackets:
107
+ Exclude:
108
+ - 'lib/rmagick_internal.rb'
109
+
110
+ # Offense count: 39
111
+ # This cop supports safe autocorrection (--autocorrect).
112
+ Lint/AmbiguousOperatorPrecedence:
113
+ Exclude:
114
+ - 'doc/ex/coalesce.rb'
115
+ - 'doc/ex/get_type_metrics.rb'
116
+ - 'doc/ex/rvg_clippath.rb'
117
+ - 'doc/ex/skewx.rb'
118
+ - 'examples/histogram.rb'
119
+ - 'examples/vignette.rb'
120
+ - 'lib/rmagick_internal.rb'
121
+ - 'lib/rvg/embellishable.rb'
122
+ - 'lib/rvg/misc.rb'
123
+ - 'lib/rvg/stretchable.rb'
124
+
125
+ # Offense count: 1
126
+ Lint/BinaryOperatorWithIdenticalOperands:
127
+ Exclude:
128
+ - 'spec/rmagick/enum/case_equality_spec.rb'
129
+
130
+ # Offense count: 2
131
+ # Configuration parameters: AllowedMethods.
132
+ # AllowedMethods: enums
133
+ Lint/ConstantDefinitionInBlock:
134
+ Exclude:
135
+ - 'Rakefile'
136
+
137
+ # Offense count: 5517
138
+ # Configuration parameters: Only, Ignore.
139
+ Lint/ConstantResolution:
140
+ Enabled: false
141
+
142
+ # Offense count: 3
143
+ # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
144
+ Lint/DuplicateBranch:
145
+ Exclude:
146
+ - 'lib/rvg/embellishable.rb'
147
+ - 'lib/rvg/misc.rb'
148
+
149
+ # Offense count: 8
150
+ # Configuration parameters: AllowComments, AllowEmptyLambdas.
151
+ Lint/EmptyBlock:
152
+ Exclude:
153
+ - 'spec/rmagick/draw/pattern_spec.rb'
154
+ - 'spec/rmagick/image/change_geometry_spec.rb'
155
+ - 'spec/rmagick/image/each_profile_spec.rb'
80
156
 
81
157
  # Offense count: 1
158
+ # Configuration parameters: AllowComments.
159
+ Lint/EmptyFile:
160
+ Exclude:
161
+ - 'spec/rmagick/image/info/view_spec.rb'
162
+
163
+ # Offense count: 1
164
+ # Configuration parameters: AllowComments.
82
165
  Lint/EmptyWhen:
83
166
  Exclude:
84
167
  - 'lib/rvg/misc.rb'
85
168
 
86
- # Offense count: 94
87
- # Cop supports --auto-correct.
169
+ # Offense count: 2
170
+ Lint/FloatComparison:
171
+ Exclude:
172
+ - 'lib/rvg/stretchable.rb'
173
+
174
+ # Offense count: 1
175
+ # This cop supports safe autocorrection (--autocorrect).
176
+ Lint/IdentityComparison:
177
+ Exclude:
178
+ - 'lib/rmagick_internal.rb'
179
+
180
+ # Offense count: 91
181
+ # This cop supports unsafe autocorrection (--autocorrect-all).
182
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredClasses.
183
+ # IgnoredClasses: Time, DateTime
88
184
  Lint/NumberConversion:
89
185
  Exclude:
90
186
  - 'doc/ex/get_pixels.rb'
91
- - 'doc/ex/stegano.rb'
92
187
  - 'examples/describe.rb'
93
188
  - 'examples/thumbnail.rb'
94
189
  - 'lib/rmagick_internal.rb'
@@ -99,36 +194,25 @@ Lint/NumberConversion:
99
194
  - 'spec/rmagick/enum/to_i_spec.rb'
100
195
  - 'spec/rmagick/image/export_pixels_spec.rb'
101
196
 
102
- # Offense count: 2
103
- # Cop supports --auto-correct.
104
- Lint/RedundantStringCoercion:
105
- Exclude:
106
- - 'spec/rmagick/font/initialize_spec.rb'
107
-
108
197
  # Offense count: 1
109
198
  Lint/RescueException:
110
199
  Exclude:
111
200
  - 'lib/rmagick_internal.rb'
112
201
 
113
202
  # Offense count: 1
114
- # Configuration parameters: AllowComments.
203
+ # Configuration parameters: AllowComments, AllowNil.
115
204
  Lint/SuppressedException:
116
205
  Exclude:
117
206
  - 'lib/rmagick_internal.rb'
118
207
 
119
- # Offense count: 1
120
- Lint/UselessComparison:
121
- Exclude:
122
- - 'spec/rmagick/enum/case_equality_spec.rb'
123
-
124
- # Offense count: 45
125
- # Configuration parameters: IgnoredMethods.
208
+ # Offense count: 39
209
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
126
210
  Metrics/AbcSize:
127
211
  Max: 537
128
212
 
129
- # Offense count: 77
130
- # Configuration parameters: CountComments, ExcludedMethods.
131
- # ExcludedMethods: refine
213
+ # Offense count: 18
214
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
215
+ # AllowedMethods: refine
132
216
  Metrics/BlockLength:
133
217
  Max: 155
134
218
 
@@ -138,29 +222,36 @@ Metrics/BlockNesting:
138
222
  Max: 4
139
223
 
140
224
  # Offense count: 9
141
- # Configuration parameters: CountComments.
225
+ # Configuration parameters: CountComments, CountAsOne.
142
226
  Metrics/ClassLength:
143
- Max: 469
227
+ Max: 500
144
228
 
145
- # Offense count: 21
146
- # Configuration parameters: IgnoredMethods.
229
+ # Offense count: 1
230
+ # Configuration parameters: LengthThreshold.
231
+ Metrics/CollectionLiteralLength:
232
+ Exclude:
233
+ - 'doc/ex/smile.rb'
234
+
235
+ # Offense count: 17
236
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
147
237
  Metrics/CyclomaticComplexity:
148
- Max: 42
238
+ Max: 44
149
239
 
150
- # Offense count: 55
151
- # Configuration parameters: CountComments, ExcludedMethods.
240
+ # Offense count: 58
241
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
152
242
  Metrics/MethodLength:
153
243
  Max: 146
154
244
 
155
- # Offense count: 14
245
+ # Offense count: 23
156
246
  # Configuration parameters: CountKeywordArgs.
157
247
  Metrics/ParameterLists:
248
+ MaxOptionalParameters: 5
158
249
  Max: 8
159
250
 
160
- # Offense count: 15
161
- # Configuration parameters: IgnoredMethods.
251
+ # Offense count: 13
252
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
162
253
  Metrics/PerceivedComplexity:
163
- Max: 40
254
+ Max: 42
164
255
 
165
256
  # Offense count: 4
166
257
  Naming/AccessorMethodName:
@@ -169,68 +260,79 @@ Naming/AccessorMethodName:
169
260
  - 'lib/rvg/misc.rb'
170
261
 
171
262
  # Offense count: 2
263
+ # Configuration parameters: AllowedNames.
264
+ # AllowedNames: module_parent
172
265
  Naming/ClassAndModuleCamelCase:
173
266
  Exclude:
174
267
  - 'lib/rmagick_internal.rb'
175
268
 
176
- # Offense count: 120
177
- Naming/ConstantName:
178
- Exclude:
179
- - 'doc/ex/arcs02.rb'
180
- - 'doc/ex/cubic01.rb'
181
- - 'doc/ex/cubic02.rb'
182
- - 'doc/ex/drop_shadow.rb'
183
- - 'doc/ex/flatten_images.rb'
184
- - 'doc/ex/get_type_metrics.rb'
185
- - 'doc/ex/gradientfill.rb'
186
- - 'doc/ex/hatchfill.rb'
187
- - 'doc/ex/rubyname.rb'
188
- - 'doc/ex/smile.rb'
189
- - 'doc/ex/tref01.rb'
190
- - 'examples/demo.rb'
191
- - 'lib/rmagick_internal.rb'
192
-
193
- # Offense count: 12
194
- # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
195
- # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
196
- Naming/FileName:
197
- Exclude:
198
- - 'doc/ex/InitialCoords.rb'
199
- - 'doc/ex/NewCoordSys.rb'
200
- - 'doc/ex/OrigCoordSys.rb'
201
- - 'doc/ex/PreserveAspectRatio.rb'
202
- - 'doc/ex/RotateScale.rb'
203
- - 'doc/ex/Skew.rb'
204
- - 'doc/ex/Use01.rb'
205
- - 'doc/ex/Use02.rb'
206
- - 'doc/ex/Use03.rb'
207
- - 'doc/ex/ViewBox.rb'
208
- - 'doc/ex/quantize-m.rb'
209
-
210
269
  # Offense count: 4
211
- # Configuration parameters: EnforcedStyle, IgnoredPatterns.
270
+ # Configuration parameters: EnforcedStyle, AllowedPatterns.
212
271
  # SupportedStyles: snake_case, camelCase
213
272
  Naming/MethodName:
214
273
  Exclude:
215
274
  - 'lib/rvg/misc.rb'
216
275
  - 'lib/rvg/transformable.rb'
217
276
 
218
- # Offense count: 222
277
+ # Offense count: 220
219
278
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
220
- # AllowedNames: io, id, to, by, on, in, at, ip, db, os, pp
279
+ # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
221
280
  Naming/MethodParameterName:
222
- Enabled: false
281
+ Exclude:
282
+ - 'doc/ex/get_type_metrics.rb'
283
+ - 'examples/histogram.rb'
284
+ - 'lib/rmagick_internal.rb'
285
+ - 'lib/rvg/clippath.rb'
286
+ - 'lib/rvg/container.rb'
287
+ - 'lib/rvg/embellishable.rb'
288
+ - 'lib/rvg/misc.rb'
289
+ - 'lib/rvg/paint.rb'
290
+ - 'lib/rvg/pathdata.rb'
291
+ - 'lib/rvg/rvg.rb'
292
+ - 'lib/rvg/stretchable.rb'
293
+ - 'lib/rvg/stylable.rb'
294
+ - 'lib/rvg/text.rb'
295
+ - 'lib/rvg/transformable.rb'
296
+ - 'lib/rvg/units.rb'
223
297
 
224
- # Offense count: 421
225
- # Configuration parameters: Max.
298
+ # Offense count: 428
299
+ # Configuration parameters: CountAsOne.
226
300
  RSpec/ExampleLength:
301
+ Max: 126
302
+
303
+ # Offense count: 538
304
+ # This cop supports safe autocorrection (--autocorrect).
305
+ # Configuration parameters: CustomTransform, IgnoredWords, DisallowedExamples.
306
+ # DisallowedExamples: works
307
+ RSpec/ExampleWording:
227
308
  Enabled: false
228
309
 
229
- # Offense count: 539
230
- # Configuration parameters: AggregateFailuresByDefault.
310
+ # Offense count: 1
311
+ # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
312
+ # Include: **/*_spec*rb*, **/spec/**/*
313
+ RSpec/FilePath:
314
+ Exclude:
315
+ - 'spec/magick_spec.rb'
316
+
317
+ # Offense count: 1
318
+ RSpec/IdenticalEqualityAssertion:
319
+ Exclude:
320
+ - 'spec/rmagick/image/spaceship_spec.rb'
321
+
322
+ # Offense count: 543
231
323
  RSpec/MultipleExpectations:
232
324
  Max: 72
233
325
 
326
+ # Offense count: 4
327
+ # Configuration parameters: AllowedPatterns.
328
+ # AllowedPatterns: ^expect_, ^assert_
329
+ RSpec/NoExpectationExample:
330
+ Exclude:
331
+ - 'spec/rmagick/image/destroy_bang_spec.rb'
332
+ - 'spec/rmagick/image/export_pixels_spec.rb'
333
+ - 'spec/rmagick/image/import_pixels_spec.rb'
334
+ - 'spec/rmagick/image_list/write_spec.rb'
335
+
234
336
  # Offense count: 4
235
337
  Security/MarshalLoad:
236
338
  Exclude:
@@ -239,18 +341,62 @@ Security/MarshalLoad:
239
341
  - 'spec/rmagick/image/marshal_spec.rb'
240
342
  - 'spec/rmagick/image_list/marshal_spec.rb'
241
343
 
344
+ # Offense count: 6
345
+ # This cop supports safe autocorrection (--autocorrect).
346
+ # Configuration parameters: AllowOnlyRestArgument, UseAnonymousForwarding, RedundantRestArgumentNames, RedundantKeywordRestArgumentNames, RedundantBlockArgumentNames.
347
+ # RedundantRestArgumentNames: args, arguments
348
+ # RedundantKeywordRestArgumentNames: kwargs, options, opts
349
+ # RedundantBlockArgumentNames: blk, block, proc
350
+ Style/ArgumentsForwarding:
351
+ Exclude:
352
+ - 'lib/rmagick_internal.rb'
353
+ - 'lib/rvg/misc.rb'
354
+
355
+ # Offense count: 153
356
+ # This cop supports unsafe autocorrection (--autocorrect-all).
357
+ Style/ArrayFirstLast:
358
+ Enabled: false
359
+
242
360
  # Offense count: 7
361
+ # This cop supports safe autocorrection (--autocorrect).
362
+ # Configuration parameters: AllowOnConstant, AllowOnSelfClass.
243
363
  Style/CaseEquality:
244
364
  Exclude:
245
365
  - 'spec/rmagick/enum/case_equality_spec.rb'
246
366
  - 'spec/rmagick/pixel/dup_spec.rb'
247
367
  - 'spec/rmagick/pixel/threequals_spec.rb'
248
368
 
249
- # Offense count: 89
369
+ # Offense count: 2
370
+ # This cop supports unsafe autocorrection (--autocorrect-all).
371
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
372
+ # AllowedMethods: ==, equal?, eql?
373
+ Style/ClassEqualityComparison:
374
+ Exclude:
375
+ - 'spec/rmagick/image_list/all_predicate_spec.rb'
376
+ - 'spec/rmagick/image_list/any_predicate_spec.rb'
377
+
378
+ # Offense count: 2
379
+ # This cop supports safe autocorrection (--autocorrect).
380
+ # Configuration parameters: EnforcedStyle.
381
+ # SupportedStyles: def_self, self_class
382
+ Style/ClassMethodsDefinitions:
383
+ Exclude:
384
+ - 'lib/rmagick_internal.rb'
385
+ - 'lib/rvg/units.rb'
386
+
387
+ # Offense count: 88
388
+ # This cop supports unsafe autocorrection (--autocorrect-all).
250
389
  Style/CommentedKeyword:
251
390
  Enabled: false
252
391
 
253
- # Offense count: 126
392
+ # Offense count: 2
393
+ # This cop supports unsafe autocorrection (--autocorrect-all).
394
+ Style/ConcatArrayLiterals:
395
+ Exclude:
396
+ - 'spec/rmagick/image_list/concat_spec.rb'
397
+
398
+ # Offense count: 129
399
+ # Configuration parameters: IgnoreModules.
254
400
  Style/ConstantVisibility:
255
401
  Exclude:
256
402
  - 'examples/histogram.rb'
@@ -262,65 +408,69 @@ Style/ConstantVisibility:
262
408
  - 'lib/rvg/stylable.rb'
263
409
  - 'spec/support/helpers.rb'
264
410
 
265
- # Offense count: 809
266
- # Cop supports --auto-correct.
267
- # Configuration parameters: Notice, AutocorrectNotice.
268
- Style/Copyright:
269
- Enabled: false
411
+ # Offense count: 9
412
+ # This cop supports safe autocorrection (--autocorrect).
413
+ # Configuration parameters: AllowedCops.
414
+ Style/DisableCopsWithinSourceCodeDirective:
415
+ Exclude:
416
+ - 'lib/rmagick_internal.rb'
417
+ - 'spec/magick_spec.rb'
418
+ - 'spec/rmagick/image_list/collect_spec.rb'
419
+ - 'spec/rmagick/image_list/find_all_spec.rb'
420
+ - 'spec/rmagick/image_list_spec.rb'
270
421
 
271
- # Offense count: 37
422
+ # Offense count: 3
423
+ Style/DocumentDynamicEvalDefinition:
424
+ Exclude:
425
+ - 'lib/rmagick_internal.rb'
426
+
427
+ # Offense count: 36
428
+ # Configuration parameters: AllowedConstants.
272
429
  Style/Documentation:
273
430
  Enabled: false
274
431
 
275
- # Offense count: 72
432
+ # Offense count: 163
276
433
  # Configuration parameters: RequireForNonPublicMethods.
277
434
  Style/DocumentationMethod:
435
+ Enabled: false
436
+
437
+ # Offense count: 4
438
+ # This cop supports safe autocorrection (--autocorrect).
439
+ # Configuration parameters: AllowedVars.
440
+ Style/FetchEnvVar:
278
441
  Exclude:
279
- - 'spec/**/*'
280
- - 'test/**/*'
281
- - 'Rakefile'
282
- - 'doc/ex/ViewBox.rb'
283
- - 'doc/ex/sparse_color.rb'
284
- - 'examples/histogram.rb'
285
- - 'examples/pattern_fill.rb'
286
442
  - 'ext/RMagick/extconf.rb'
287
- - 'lib/rmagick_internal.rb'
288
- - 'lib/rvg/container.rb'
289
- - 'lib/rvg/deep_equal.rb'
290
- - 'lib/rvg/embellishable.rb'
291
- - 'lib/rvg/misc.rb'
292
- - 'lib/rvg/stylable.rb'
293
- - 'lib/rvg/transformable.rb'
294
- - 'lib/rvg/units.rb'
295
443
 
296
- # Offense count: 208
297
- # Configuration parameters: EnforcedStyle.
444
+ # Offense count: 191
445
+ # This cop supports safe autocorrection (--autocorrect).
446
+ # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
298
447
  # SupportedStyles: annotated, template, unannotated
299
448
  Style/FormatStringToken:
300
- Exclude:
301
- - 'doc/ex/colors.rb'
302
- - 'doc/ex/fonts.rb'
303
- - 'doc/ex/implode.rb'
304
- - 'doc/ex/stegano.rb'
305
- - 'examples/identify.rb'
306
- - 'lib/rmagick_internal.rb'
307
- - 'lib/rvg/pathdata.rb'
449
+ EnforcedStyle: unannotated
308
450
 
309
- # Offense count: 808
310
- # Cop supports --auto-correct.
451
+ # Offense count: 802
452
+ # This cop supports unsafe autocorrection (--autocorrect-all).
311
453
  # Configuration parameters: EnforcedStyle.
312
454
  # SupportedStyles: always, always_true, never
313
455
  Style/FrozenStringLiteralComment:
314
456
  Enabled: false
315
457
 
316
- # Offense count: 42
458
+ # Offense count: 1
459
+ # This cop supports unsafe autocorrection (--autocorrect-all).
460
+ Style/GlobalStdStream:
461
+ Exclude:
462
+ - 'Rakefile'
463
+
464
+ # Offense count: 46
317
465
  # Configuration parameters: AllowedVariables.
318
466
  Style/GlobalVars:
319
467
  Exclude:
320
468
  - 'ext/RMagick/extconf.rb'
321
469
 
322
470
  # Offense count: 12
323
- # Cop supports --auto-correct.
471
+ # This cop supports unsafe autocorrection (--autocorrect-all).
472
+ # Configuration parameters: AllowedReceivers.
473
+ # AllowedReceivers: Thread.current
324
474
  Style/HashEachMethods:
325
475
  Exclude:
326
476
  - 'doc/ex/preview.rb'
@@ -336,30 +486,37 @@ Style/HashEachMethods:
336
486
  - 'spec/rmagick/image/info/orientation_spec.rb'
337
487
  - 'spec/rmagick/image/info/units_spec.rb'
338
488
 
339
- # Offense count: 6
340
- # Cop supports --auto-correct.
489
+ # Offense count: 4
490
+ # This cop supports safe autocorrection (--autocorrect).
341
491
  Style/IfUnlessModifier:
342
492
  Exclude:
343
493
  - 'ext/RMagick/extconf.rb'
344
494
 
345
- # Offense count: 148
495
+ # Offense count: 146
346
496
  Style/InlineComment:
347
497
  Enabled: false
348
498
 
349
- # Offense count: 4804
350
- # Cop supports --auto-correct.
351
- # Configuration parameters: IgnoreMacros, IgnoredMethods, IgnoredPatterns, IncludedMacros, AllowParenthesesInMultilineCall, AllowParenthesesInChaining, AllowParenthesesInCamelCaseMethod, EnforcedStyle.
499
+ # Offense count: 10
500
+ # This cop supports unsafe autocorrection (--autocorrect-all).
501
+ # Configuration parameters: InverseMethods.
502
+ Style/InvertibleUnlessCondition:
503
+ Exclude:
504
+ - 'doc/ex/get_type_metrics.rb'
505
+ - 'examples/identify.rb'
506
+ - 'ext/RMagick/extconf.rb'
507
+ - 'lib/rmagick_internal.rb'
508
+ - 'lib/rvg/embellishable.rb'
509
+ - 'lib/rvg/stretchable.rb'
510
+
511
+ # Offense count: 4509
512
+ # This cop supports safe autocorrection (--autocorrect).
513
+ # Configuration parameters: IgnoreMacros, AllowedMethods, AllowedPatterns, IncludedMacros, AllowParenthesesInMultilineCall, AllowParenthesesInChaining, AllowParenthesesInCamelCaseMethod, AllowParenthesesInStringInterpolation, EnforcedStyle.
352
514
  # SupportedStyles: require_parentheses, omit_parentheses
353
515
  Style/MethodCallWithArgsParentheses:
354
516
  Enabled: false
355
517
 
356
- # Offense count: 2
357
- Style/MethodMissingSuper:
358
- Exclude:
359
- - 'lib/rmagick_internal.rb'
360
- - 'lib/rvg/misc.rb'
361
-
362
- # Offense count: 64
518
+ # Offense count: 57
519
+ # This cop supports safe autocorrection (--autocorrect).
363
520
  # Configuration parameters: EnforcedStyle.
364
521
  # SupportedStyles: if, case, both
365
522
  Style/MissingElse:
@@ -371,32 +528,16 @@ Style/MissingRespondToMissing:
371
528
  - 'lib/rmagick_internal.rb'
372
529
  - 'lib/rvg/misc.rb'
373
530
 
374
- # Offense count: 12
375
- Style/MixinUsage:
376
- Exclude:
377
- - 'doc/ex/colors.rb'
378
- - 'doc/ex/composite.rb'
379
- - 'doc/ex/crop_with_gravity.rb'
380
- - 'doc/ex/smile.rb'
381
- - 'examples/crop_with_gravity.rb'
382
- - 'examples/demo.rb'
383
- - 'examples/image_opacity.rb'
384
- - 'examples/import_export.rb'
385
- - 'examples/pattern_fill.rb'
386
- - 'examples/rotating_text.rb'
387
- - 'examples/thumbnail.rb'
388
- - 'examples/vignette.rb'
389
-
390
- # Offense count: 152
391
- # Cop supports --auto-correct.
531
+ # Offense count: 59
532
+ # This cop supports unsafe autocorrection (--autocorrect-all).
392
533
  # Configuration parameters: EnforcedStyle.
393
534
  # SupportedStyles: literals, strict
394
535
  Style/MutableConstant:
395
536
  Enabled: false
396
537
 
397
538
  # Offense count: 32
398
- # Cop supports --auto-correct.
399
- # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
539
+ # This cop supports unsafe autocorrection (--autocorrect-all).
540
+ # Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
400
541
  # SupportedStyles: predicate, comparison
401
542
  Style/NumericPredicate:
402
543
  Exclude:
@@ -404,36 +545,54 @@ Style/NumericPredicate:
404
545
  - 'lib/rmagick_internal.rb'
405
546
  - 'lib/rvg/embellishable.rb'
406
547
 
407
- # Offense count: 1
408
- # Cop supports --auto-correct.
409
- # Configuration parameters: AllowMultipleReturnValues.
410
- Style/RedundantReturn:
548
+ # Offense count: 4
549
+ # Configuration parameters: AllowedMethods.
550
+ # AllowedMethods: respond_to_missing?
551
+ Style/OptionalBooleanParameter:
411
552
  Exclude:
412
- - 'examples/histogram.rb'
553
+ - 'doc/ex/sparse_color.rb'
554
+ - 'lib/rmagick_internal.rb'
555
+ - 'lib/rvg/pathdata.rb'
413
556
 
414
- # Offense count: 3
415
- # Cop supports --auto-correct.
416
- # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
417
- # AllowedMethods: present?, blank?, presence, try, try!
418
- Style/SafeNavigation:
557
+ # Offense count: 16
558
+ # This cop supports safe autocorrection (--autocorrect).
559
+ # Configuration parameters: .
560
+ # SupportedStyles: same_as_string_literals, single_quotes, double_quotes
561
+ Style/QuotedSymbols:
562
+ EnforcedStyle: double_quotes
563
+
564
+ # Offense count: 1
565
+ # This cop supports safe autocorrection (--autocorrect).
566
+ Style/RedundantBegin:
419
567
  Exclude:
420
- - 'lib/rmagick_internal.rb'
568
+ - 'lib/rvg/stylable.rb'
421
569
 
422
- # Offense count: 5
423
- Style/Send:
570
+ # Offense count: 19
571
+ # This cop supports unsafe autocorrection (--autocorrect-all).
572
+ Style/RequireOrder:
424
573
  Exclude:
574
+ - 'Rakefile'
575
+ - 'doc/ex/polaroid.rb'
576
+ - 'ext/RMagick/extconf.rb'
425
577
  - 'lib/rmagick_internal.rb'
426
- - 'spec/rmagick/image/destroy_spec.rb'
578
+ - 'lib/rvg/rvg.rb'
579
+ - 'rmagick.gemspec'
580
+ - 'spec/spec_helper.rb'
427
581
 
428
- # Offense count: 2
429
- # Configuration parameters: Methods.
430
- # Methods: {"reduce"=>["acc", "elem"]}, {"inject"=>["acc", "elem"]}
431
- Style/SingleLineBlockParams:
582
+ # Offense count: 1
583
+ # This cop supports unsafe autocorrection (--autocorrect-all).
584
+ Style/StaticClass:
432
585
  Exclude:
433
- - 'lib/rvg/misc.rb'
586
+ - 'spec/rmagick/draw/class_methods/_dummy_img__spec.rb'
434
587
 
435
- # Offense count: 20
436
- # Cop supports --auto-correct.
588
+ # Offense count: 185
589
+ # This cop supports unsafe autocorrection (--autocorrect-all).
590
+ # Configuration parameters: Mode.
591
+ Style/StringConcatenation:
592
+ Enabled: false
593
+
594
+ # Offense count: 18
595
+ # This cop supports unsafe autocorrection (--autocorrect-all).
437
596
  Style/StringHashKeys:
438
597
  Exclude:
439
598
  - 'Rakefile'
@@ -441,16 +600,31 @@ Style/StringHashKeys:
441
600
  - 'lib/rvg/misc.rb'
442
601
  - 'spec/rmagick/image/properties_spec.rb'
443
602
 
444
- # Offense count: 226
445
- # Cop supports --auto-correct.
603
+ # Offense count: 233
604
+ # This cop supports safe autocorrection (--autocorrect).
446
605
  # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
447
606
  # SupportedStyles: single_quotes, double_quotes
448
607
  Style/StringLiterals:
449
608
  Enabled: false
450
609
 
451
- # Offense count: 975
452
- # Cop supports --auto-correct.
453
- # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
610
+ # Offense count: 1
611
+ # This cop supports unsafe autocorrection (--autocorrect-all).
612
+ # Configuration parameters: EnforcedStyle.
613
+ # SupportedStyles: forbid_for_all_comparison_operators, forbid_for_equality_operators_only, require_for_all_comparison_operators, require_for_equality_operators_only
614
+ Style/YodaCondition:
615
+ Exclude:
616
+ - 'spec/rmagick/image/destroy_spec.rb'
617
+
618
+ # Offense count: 110
619
+ # This cop supports unsafe autocorrection (--autocorrect-all).
620
+ # Configuration parameters: .
621
+ # SupportedOperators: *, +, &, |, ^
622
+ Style/YodaExpression:
623
+ Enabled: false
624
+
625
+ # Offense count: 135
626
+ # This cop supports safe autocorrection (--autocorrect).
627
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
454
628
  # URISchemes: http, https
455
629
  Layout/LineLength:
456
630
  Max: 217