rmagick 5.4.4 → 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.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/.devcontainer/ImageMagick6/devcontainer.json +1 -1
  3. data/.devcontainer/devcontainer.json +1 -1
  4. data/.github/workflows/ci.yml +41 -31
  5. data/.gitignore +1 -0
  6. data/.rubocop.yml +36 -9
  7. data/.rubocop_todo.yml +369 -187
  8. data/CHANGELOG.md +77 -0
  9. data/Gemfile +14 -0
  10. data/README.md +3 -3
  11. data/Rakefile +12 -1
  12. data/before_install_linux.sh +1 -11
  13. data/before_install_osx.sh +5 -7
  14. data/ext/RMagick/extconf.rb +58 -68
  15. data/ext/RMagick/rmagick.h +7 -12
  16. data/ext/RMagick/rmdraw.cpp +10 -20
  17. data/ext/RMagick/rmfill.cpp +4 -4
  18. data/ext/RMagick/rmilist.cpp +10 -2
  19. data/ext/RMagick/rmimage.cpp +342 -344
  20. data/ext/RMagick/rminfo.cpp +22 -21
  21. data/ext/RMagick/rmkinfo.cpp +5 -18
  22. data/ext/RMagick/rmmain.cpp +42 -91
  23. data/ext/RMagick/rmmontage.cpp +5 -5
  24. data/ext/RMagick/rmpixel.cpp +3 -3
  25. data/ext/RMagick/rmutil.cpp +58 -89
  26. data/lib/rmagick/version.rb +3 -3
  27. data/lib/rmagick.rb +1 -1
  28. data/lib/rmagick_internal.rb +111 -103
  29. data/lib/rvg/container.rb +3 -3
  30. data/lib/rvg/embellishable.rb +7 -3
  31. data/lib/rvg/misc.rb +15 -15
  32. data/lib/rvg/rvg.rb +6 -6
  33. data/lib/rvg/stretchable.rb +2 -2
  34. data/lib/rvg/stylable.rb +2 -2
  35. data/lib/rvg/transformable.rb +1 -1
  36. data/lib/rvg/units.rb +1 -0
  37. data/rmagick.gemspec +2 -15
  38. data/sig/rmagick/_draw_common_methods.rbs +64 -0
  39. data/sig/rmagick/_image_common_methods.rbs +387 -0
  40. data/sig/rmagick/draw.rbs +38 -0
  41. data/sig/rmagick/draw_attribute.rbs +28 -0
  42. data/sig/rmagick/enum.rbs +820 -0
  43. data/sig/rmagick/error.rbs +11 -0
  44. data/sig/rmagick/fill.rbs +21 -0
  45. data/sig/rmagick/geometry.rbs +14 -0
  46. data/sig/rmagick/image.rbs +196 -0
  47. data/sig/rmagick/image_list.rbs +183 -0
  48. data/sig/rmagick/iptc.rbs +101 -0
  49. data/sig/rmagick/kernel_info.rbs +12 -0
  50. data/sig/rmagick/optional_method_arguments.rbs +10 -0
  51. data/sig/rmagick/pixel.rbs +46 -0
  52. data/sig/rmagick/struct.rbs +90 -0
  53. data/sig/rmagick.rbs +43 -0
  54. data/sig/rvg/clippath.rbs +34 -0
  55. data/sig/rvg/container.rbs +78 -0
  56. data/sig/rvg/deep_equal.rbs +48 -0
  57. data/sig/rvg/describable.rbs +30 -0
  58. data/sig/rvg/embellishable.rbs +226 -0
  59. data/sig/rvg/misc.rbs +145 -0
  60. data/sig/rvg/paint.rbs +55 -0
  61. data/sig/rvg/pathdata.rbs +77 -0
  62. data/sig/rvg/rvg.rbs +125 -0
  63. data/sig/rvg/stretchable.rbs +56 -0
  64. data/sig/rvg/stylable.rbs +66 -0
  65. data/sig/rvg/text.rbs +118 -0
  66. data/sig/rvg/transformable.rbs +59 -0
  67. data/sig/rvg/units.rbs +33 -0
  68. metadata +38 -134
data/.rubocop_todo.yml CHANGED
@@ -1,21 +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: 11
10
+ # Configuration parameters: Include, IgnoredGems, OnlyFor.
11
+ # Include: **/*.gemfile, **/Gemfile, **/gems.rb
12
+ Bundler/GemComment:
13
+ Exclude:
14
+ - 'Gemfile'
15
+
9
16
  # Offense count: 1
10
- # Cop supports --auto-correct.
11
- # Configuration parameters: TreatCommentsAsGroupSeparators, Include.
17
+ # This cop supports safe autocorrection (--autocorrect).
18
+ # Configuration parameters: Severity, Include.
12
19
  # Include: **/*.gemspec
13
- Gemspec/OrderedDependencies:
20
+ Gemspec/RequireMFA:
14
21
  Exclude:
15
22
  - 'rmagick.gemspec'
16
23
 
17
- # Offense count: 12
18
- # Cop supports --auto-correct.
24
+ # Offense count: 1
25
+ # Configuration parameters: Severity, Include.
26
+ # Include: **/*.gemspec
27
+ Gemspec/RequiredRubyVersion:
28
+ Exclude:
29
+ - 'rmagick.gemspec'
30
+
31
+ # Offense count: 11
32
+ # This cop supports unsafe autocorrection (--autocorrect-all).
19
33
  # Configuration parameters: Categories, ExpectedOrder.
20
34
  # ExpectedOrder: module_inclusion, constants, public_class_methods, initializer, public_methods, protected_methods, private_methods
21
35
  Layout/ClassStructure:
@@ -26,10 +40,20 @@ Layout/ClassStructure:
26
40
  - 'lib/rvg/misc.rb'
27
41
  - 'lib/rvg/pathdata.rb'
28
42
  - 'lib/rvg/rvg.rb'
29
- - 'lib/rvg/to_c.rb'
30
43
 
31
- # Offense count: 2312
32
- # 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.
33
57
  Layout/MultilineArrayLineBreaks:
34
58
  Exclude:
35
59
  - 'doc/ex/add_noise.rb'
@@ -42,7 +66,8 @@ Layout/MultilineArrayLineBreaks:
42
66
  - 'lib/rvg/stylable.rb'
43
67
 
44
68
  # Offense count: 192
45
- # Cop supports --auto-correct.
69
+ # This cop supports safe autocorrection (--autocorrect).
70
+ # Configuration parameters: AllowMultilineFinalElement.
46
71
  Layout/MultilineMethodArgumentLineBreaks:
47
72
  Exclude:
48
73
  - 'doc/ex/axes.rb'
@@ -56,66 +81,138 @@ Layout/MultilineMethodArgumentLineBreaks:
56
81
  - 'examples/vignette.rb'
57
82
  - 'lib/rmagick_internal.rb'
58
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
+
59
95
  # Offense count: 1
60
- # Cop supports --auto-correct.
61
- # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
96
+ # This cop supports safe autocorrection (--autocorrect).
97
+ # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator, EnforcedStyleForRationalLiterals.
62
98
  # SupportedStylesForExponentOperator: space, no_space
99
+ # SupportedStylesForRationalLiterals: space, no_space
63
100
  Layout/SpaceAroundOperators:
64
101
  Exclude:
65
- - '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'
156
+
157
+ # Offense count: 1
158
+ # Configuration parameters: AllowComments.
159
+ Lint/EmptyFile:
160
+ Exclude:
161
+ - 'spec/rmagick/image/info/view_spec.rb'
66
162
 
67
163
  # Offense count: 1
164
+ # Configuration parameters: AllowComments.
68
165
  Lint/EmptyWhen:
69
166
  Exclude:
70
167
  - 'lib/rvg/misc.rb'
71
168
 
72
- # Offense count: 94
73
- # 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
74
184
  Lint/NumberConversion:
75
185
  Exclude:
76
186
  - 'doc/ex/get_pixels.rb'
77
- - 'doc/ex/stegano.rb'
78
187
  - 'examples/describe.rb'
79
188
  - 'examples/thumbnail.rb'
80
189
  - 'lib/rmagick_internal.rb'
81
190
  - 'lib/rvg/misc.rb'
82
- - 'lib/rvg/to_c.rb'
83
191
  - 'spec/magick_spec.rb'
84
192
  - 'spec/rmagick/align_type/class_methods/values_spec.rb'
85
193
  - 'spec/rmagick/enum/bitwise_or_spec.rb'
86
194
  - 'spec/rmagick/enum/to_i_spec.rb'
87
195
  - 'spec/rmagick/image/export_pixels_spec.rb'
88
196
 
89
- # Offense count: 2
90
- # Cop supports --auto-correct.
91
- Lint/RedundantStringCoercion:
92
- Exclude:
93
- - 'spec/rmagick/font/initialize_spec.rb'
94
-
95
197
  # Offense count: 1
96
198
  Lint/RescueException:
97
199
  Exclude:
98
200
  - 'lib/rmagick_internal.rb'
99
201
 
100
202
  # Offense count: 1
101
- # Configuration parameters: AllowComments.
203
+ # Configuration parameters: AllowComments, AllowNil.
102
204
  Lint/SuppressedException:
103
205
  Exclude:
104
206
  - 'lib/rmagick_internal.rb'
105
207
 
106
- # Offense count: 1
107
- Lint/UselessComparison:
108
- Exclude:
109
- - 'spec/rmagick/enum/case_equality_spec.rb'
110
-
111
- # Offense count: 45
112
- # Configuration parameters: IgnoredMethods.
208
+ # Offense count: 39
209
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
113
210
  Metrics/AbcSize:
114
211
  Max: 537
115
212
 
116
- # Offense count: 77
117
- # Configuration parameters: CountComments, ExcludedMethods.
118
- # ExcludedMethods: refine
213
+ # Offense count: 18
214
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
215
+ # AllowedMethods: refine
119
216
  Metrics/BlockLength:
120
217
  Max: 155
121
218
 
@@ -125,29 +222,36 @@ Metrics/BlockNesting:
125
222
  Max: 4
126
223
 
127
224
  # Offense count: 9
128
- # Configuration parameters: CountComments.
225
+ # Configuration parameters: CountComments, CountAsOne.
129
226
  Metrics/ClassLength:
130
- Max: 460
227
+ Max: 500
131
228
 
132
- # Offense count: 21
133
- # 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.
134
237
  Metrics/CyclomaticComplexity:
135
- Max: 42
238
+ Max: 44
136
239
 
137
- # Offense count: 55
138
- # Configuration parameters: CountComments, ExcludedMethods.
240
+ # Offense count: 58
241
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
139
242
  Metrics/MethodLength:
140
243
  Max: 146
141
244
 
142
- # Offense count: 14
245
+ # Offense count: 23
143
246
  # Configuration parameters: CountKeywordArgs.
144
247
  Metrics/ParameterLists:
248
+ MaxOptionalParameters: 5
145
249
  Max: 8
146
250
 
147
- # Offense count: 15
148
- # Configuration parameters: IgnoredMethods.
251
+ # Offense count: 13
252
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
149
253
  Metrics/PerceivedComplexity:
150
- Max: 40
254
+ Max: 42
151
255
 
152
256
  # Offense count: 4
153
257
  Naming/AccessorMethodName:
@@ -156,68 +260,79 @@ Naming/AccessorMethodName:
156
260
  - 'lib/rvg/misc.rb'
157
261
 
158
262
  # Offense count: 2
263
+ # Configuration parameters: AllowedNames.
264
+ # AllowedNames: module_parent
159
265
  Naming/ClassAndModuleCamelCase:
160
266
  Exclude:
161
267
  - 'lib/rmagick_internal.rb'
162
268
 
163
- # Offense count: 120
164
- Naming/ConstantName:
165
- Exclude:
166
- - 'doc/ex/arcs02.rb'
167
- - 'doc/ex/cubic01.rb'
168
- - 'doc/ex/cubic02.rb'
169
- - 'doc/ex/drop_shadow.rb'
170
- - 'doc/ex/flatten_images.rb'
171
- - 'doc/ex/get_type_metrics.rb'
172
- - 'doc/ex/gradientfill.rb'
173
- - 'doc/ex/hatchfill.rb'
174
- - 'doc/ex/rubyname.rb'
175
- - 'doc/ex/smile.rb'
176
- - 'doc/ex/tref01.rb'
177
- - 'examples/demo.rb'
178
- - 'lib/rmagick_internal.rb'
179
-
180
- # Offense count: 12
181
- # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
182
- # 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
183
- Naming/FileName:
184
- Exclude:
185
- - 'doc/ex/InitialCoords.rb'
186
- - 'doc/ex/NewCoordSys.rb'
187
- - 'doc/ex/OrigCoordSys.rb'
188
- - 'doc/ex/PreserveAspectRatio.rb'
189
- - 'doc/ex/RotateScale.rb'
190
- - 'doc/ex/Skew.rb'
191
- - 'doc/ex/Use01.rb'
192
- - 'doc/ex/Use02.rb'
193
- - 'doc/ex/Use03.rb'
194
- - 'doc/ex/ViewBox.rb'
195
- - 'doc/ex/quantize-m.rb'
196
-
197
269
  # Offense count: 4
198
- # Configuration parameters: EnforcedStyle, IgnoredPatterns.
270
+ # Configuration parameters: EnforcedStyle, AllowedPatterns.
199
271
  # SupportedStyles: snake_case, camelCase
200
272
  Naming/MethodName:
201
273
  Exclude:
202
274
  - 'lib/rvg/misc.rb'
203
275
  - 'lib/rvg/transformable.rb'
204
276
 
205
- # Offense count: 222
277
+ # Offense count: 220
206
278
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
207
- # 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
208
280
  Naming/MethodParameterName:
209
- 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'
210
297
 
211
- # Offense count: 421
212
- # Configuration parameters: Max.
298
+ # Offense count: 428
299
+ # Configuration parameters: CountAsOne.
213
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:
214
308
  Enabled: false
215
309
 
216
- # Offense count: 539
217
- # 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
218
323
  RSpec/MultipleExpectations:
219
324
  Max: 72
220
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
+
221
336
  # Offense count: 4
222
337
  Security/MarshalLoad:
223
338
  Exclude:
@@ -226,23 +341,62 @@ Security/MarshalLoad:
226
341
  - 'spec/rmagick/image/marshal_spec.rb'
227
342
  - 'spec/rmagick/image_list/marshal_spec.rb'
228
343
 
229
- # Offense count: 1
230
- Style/AutoResourceCleanup:
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:
231
351
  Exclude:
232
- - 'lib/rvg/to_c.rb'
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
233
359
 
234
360
  # Offense count: 7
361
+ # This cop supports safe autocorrection (--autocorrect).
362
+ # Configuration parameters: AllowOnConstant, AllowOnSelfClass.
235
363
  Style/CaseEquality:
236
364
  Exclude:
237
365
  - 'spec/rmagick/enum/case_equality_spec.rb'
238
366
  - 'spec/rmagick/pixel/dup_spec.rb'
239
367
  - 'spec/rmagick/pixel/threequals_spec.rb'
240
368
 
241
- # 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).
242
389
  Style/CommentedKeyword:
243
390
  Enabled: false
244
391
 
245
- # 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.
246
400
  Style/ConstantVisibility:
247
401
  Exclude:
248
402
  - 'examples/histogram.rb'
@@ -254,65 +408,69 @@ Style/ConstantVisibility:
254
408
  - 'lib/rvg/stylable.rb'
255
409
  - 'spec/support/helpers.rb'
256
410
 
257
- # Offense count: 809
258
- # Cop supports --auto-correct.
259
- # Configuration parameters: Notice, AutocorrectNotice.
260
- Style/Copyright:
261
- 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'
421
+
422
+ # Offense count: 3
423
+ Style/DocumentDynamicEvalDefinition:
424
+ Exclude:
425
+ - 'lib/rmagick_internal.rb'
262
426
 
263
- # Offense count: 37
427
+ # Offense count: 36
428
+ # Configuration parameters: AllowedConstants.
264
429
  Style/Documentation:
265
430
  Enabled: false
266
431
 
267
- # Offense count: 72
432
+ # Offense count: 163
268
433
  # Configuration parameters: RequireForNonPublicMethods.
269
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:
270
441
  Exclude:
271
- - 'spec/**/*'
272
- - 'test/**/*'
273
- - 'Rakefile'
274
- - 'doc/ex/ViewBox.rb'
275
- - 'doc/ex/sparse_color.rb'
276
- - 'examples/histogram.rb'
277
- - 'examples/pattern_fill.rb'
278
442
  - 'ext/RMagick/extconf.rb'
279
- - 'lib/rmagick_internal.rb'
280
- - 'lib/rvg/container.rb'
281
- - 'lib/rvg/deep_equal.rb'
282
- - 'lib/rvg/embellishable.rb'
283
- - 'lib/rvg/misc.rb'
284
- - 'lib/rvg/stylable.rb'
285
- - 'lib/rvg/transformable.rb'
286
- - 'lib/rvg/units.rb'
287
443
 
288
- # Offense count: 208
289
- # Configuration parameters: EnforcedStyle.
444
+ # Offense count: 191
445
+ # This cop supports safe autocorrection (--autocorrect).
446
+ # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
290
447
  # SupportedStyles: annotated, template, unannotated
291
448
  Style/FormatStringToken:
292
- Exclude:
293
- - 'doc/ex/colors.rb'
294
- - 'doc/ex/fonts.rb'
295
- - 'doc/ex/implode.rb'
296
- - 'doc/ex/stegano.rb'
297
- - 'examples/identify.rb'
298
- - 'lib/rmagick_internal.rb'
299
- - 'lib/rvg/pathdata.rb'
449
+ EnforcedStyle: unannotated
300
450
 
301
- # Offense count: 808
302
- # Cop supports --auto-correct.
451
+ # Offense count: 802
452
+ # This cop supports unsafe autocorrection (--autocorrect-all).
303
453
  # Configuration parameters: EnforcedStyle.
304
454
  # SupportedStyles: always, always_true, never
305
455
  Style/FrozenStringLiteralComment:
306
456
  Enabled: false
307
457
 
308
- # 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
309
465
  # Configuration parameters: AllowedVariables.
310
466
  Style/GlobalVars:
311
467
  Exclude:
312
468
  - 'ext/RMagick/extconf.rb'
313
469
 
314
470
  # Offense count: 12
315
- # Cop supports --auto-correct.
471
+ # This cop supports unsafe autocorrection (--autocorrect-all).
472
+ # Configuration parameters: AllowedReceivers.
473
+ # AllowedReceivers: Thread.current
316
474
  Style/HashEachMethods:
317
475
  Exclude:
318
476
  - 'doc/ex/preview.rb'
@@ -328,30 +486,37 @@ Style/HashEachMethods:
328
486
  - 'spec/rmagick/image/info/orientation_spec.rb'
329
487
  - 'spec/rmagick/image/info/units_spec.rb'
330
488
 
331
- # Offense count: 6
332
- # Cop supports --auto-correct.
489
+ # Offense count: 4
490
+ # This cop supports safe autocorrection (--autocorrect).
333
491
  Style/IfUnlessModifier:
334
492
  Exclude:
335
493
  - 'ext/RMagick/extconf.rb'
336
494
 
337
- # Offense count: 148
495
+ # Offense count: 146
338
496
  Style/InlineComment:
339
497
  Enabled: false
340
498
 
341
- # Offense count: 4804
342
- # Cop supports --auto-correct.
343
- # 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.
344
514
  # SupportedStyles: require_parentheses, omit_parentheses
345
515
  Style/MethodCallWithArgsParentheses:
346
516
  Enabled: false
347
517
 
348
- # Offense count: 2
349
- Style/MethodMissingSuper:
350
- Exclude:
351
- - 'lib/rmagick_internal.rb'
352
- - 'lib/rvg/misc.rb'
353
-
354
- # Offense count: 64
518
+ # Offense count: 57
519
+ # This cop supports safe autocorrection (--autocorrect).
355
520
  # Configuration parameters: EnforcedStyle.
356
521
  # SupportedStyles: if, case, both
357
522
  Style/MissingElse:
@@ -363,32 +528,16 @@ Style/MissingRespondToMissing:
363
528
  - 'lib/rmagick_internal.rb'
364
529
  - 'lib/rvg/misc.rb'
365
530
 
366
- # Offense count: 12
367
- Style/MixinUsage:
368
- Exclude:
369
- - 'doc/ex/colors.rb'
370
- - 'doc/ex/composite.rb'
371
- - 'doc/ex/crop_with_gravity.rb'
372
- - 'doc/ex/smile.rb'
373
- - 'examples/crop_with_gravity.rb'
374
- - 'examples/demo.rb'
375
- - 'examples/image_opacity.rb'
376
- - 'examples/import_export.rb'
377
- - 'examples/pattern_fill.rb'
378
- - 'examples/rotating_text.rb'
379
- - 'examples/thumbnail.rb'
380
- - 'examples/vignette.rb'
381
-
382
- # Offense count: 152
383
- # Cop supports --auto-correct.
531
+ # Offense count: 59
532
+ # This cop supports unsafe autocorrection (--autocorrect-all).
384
533
  # Configuration parameters: EnforcedStyle.
385
534
  # SupportedStyles: literals, strict
386
535
  Style/MutableConstant:
387
536
  Enabled: false
388
537
 
389
538
  # Offense count: 32
390
- # Cop supports --auto-correct.
391
- # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
539
+ # This cop supports unsafe autocorrection (--autocorrect-all).
540
+ # Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
392
541
  # SupportedStyles: predicate, comparison
393
542
  Style/NumericPredicate:
394
543
  Exclude:
@@ -396,36 +545,54 @@ Style/NumericPredicate:
396
545
  - 'lib/rmagick_internal.rb'
397
546
  - 'lib/rvg/embellishable.rb'
398
547
 
399
- # Offense count: 1
400
- # Cop supports --auto-correct.
401
- # Configuration parameters: AllowMultipleReturnValues.
402
- Style/RedundantReturn:
548
+ # Offense count: 4
549
+ # Configuration parameters: AllowedMethods.
550
+ # AllowedMethods: respond_to_missing?
551
+ Style/OptionalBooleanParameter:
403
552
  Exclude:
404
- - 'examples/histogram.rb'
553
+ - 'doc/ex/sparse_color.rb'
554
+ - 'lib/rmagick_internal.rb'
555
+ - 'lib/rvg/pathdata.rb'
405
556
 
406
- # Offense count: 3
407
- # Cop supports --auto-correct.
408
- # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
409
- # AllowedMethods: present?, blank?, presence, try, try!
410
- 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:
411
567
  Exclude:
412
- - 'lib/rmagick_internal.rb'
568
+ - 'lib/rvg/stylable.rb'
413
569
 
414
- # Offense count: 5
415
- Style/Send:
570
+ # Offense count: 19
571
+ # This cop supports unsafe autocorrection (--autocorrect-all).
572
+ Style/RequireOrder:
416
573
  Exclude:
574
+ - 'Rakefile'
575
+ - 'doc/ex/polaroid.rb'
576
+ - 'ext/RMagick/extconf.rb'
417
577
  - 'lib/rmagick_internal.rb'
418
- - 'spec/rmagick/image/destroy_spec.rb'
578
+ - 'lib/rvg/rvg.rb'
579
+ - 'rmagick.gemspec'
580
+ - 'spec/spec_helper.rb'
419
581
 
420
- # Offense count: 2
421
- # Configuration parameters: Methods.
422
- # Methods: {"reduce"=>["acc", "elem"]}, {"inject"=>["acc", "elem"]}
423
- Style/SingleLineBlockParams:
582
+ # Offense count: 1
583
+ # This cop supports unsafe autocorrection (--autocorrect-all).
584
+ Style/StaticClass:
424
585
  Exclude:
425
- - 'lib/rvg/misc.rb'
586
+ - 'spec/rmagick/draw/class_methods/_dummy_img__spec.rb'
426
587
 
427
- # Offense count: 20
428
- # 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).
429
596
  Style/StringHashKeys:
430
597
  Exclude:
431
598
  - 'Rakefile'
@@ -433,16 +600,31 @@ Style/StringHashKeys:
433
600
  - 'lib/rvg/misc.rb'
434
601
  - 'spec/rmagick/image/properties_spec.rb'
435
602
 
436
- # Offense count: 226
437
- # Cop supports --auto-correct.
603
+ # Offense count: 233
604
+ # This cop supports safe autocorrection (--autocorrect).
438
605
  # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
439
606
  # SupportedStyles: single_quotes, double_quotes
440
607
  Style/StringLiterals:
441
608
  Enabled: false
442
609
 
443
- # Offense count: 975
444
- # Cop supports --auto-correct.
445
- # 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.
446
628
  # URISchemes: http, https
447
629
  Layout/LineLength:
448
630
  Max: 217