svg_conform 0.1.4 → 0.1.5
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/.rubocop_todo.yml +182 -21
- data/README.adoc +391 -989
- data/config/profiles/metanorma.yml +5 -0
- data/docs/api_reference.adoc +1355 -0
- data/docs/cli_guide.adoc +846 -0
- data/docs/reference_manifest.adoc +370 -0
- data/docs/requirements.adoc +68 -1
- data/examples/document_input_demo.rb +102 -0
- data/lib/svg_conform/document.rb +40 -1
- data/lib/svg_conform/profile.rb +15 -9
- data/lib/svg_conform/references/base_reference.rb +130 -0
- data/lib/svg_conform/references/id_definition.rb +38 -0
- data/lib/svg_conform/references/reference_classifier.rb +45 -0
- data/lib/svg_conform/references/reference_manifest.rb +129 -0
- data/lib/svg_conform/references.rb +11 -0
- data/lib/svg_conform/remediations/namespace_attribute_remediation.rb +34 -43
- data/lib/svg_conform/requirements/id_collection_requirement.rb +38 -0
- data/lib/svg_conform/requirements/id_reference_requirement.rb +11 -0
- data/lib/svg_conform/requirements/invalid_id_references_requirement.rb +3 -0
- data/lib/svg_conform/requirements/link_validation_requirement.rb +114 -31
- data/lib/svg_conform/requirements/no_external_css_requirement.rb +5 -2
- data/lib/svg_conform/requirements.rb +11 -9
- data/lib/svg_conform/sax_validation_handler.rb +16 -1
- data/lib/svg_conform/validation_context.rb +67 -1
- data/lib/svg_conform/validation_result.rb +43 -2
- data/lib/svg_conform/validator.rb +56 -16
- data/lib/svg_conform/version.rb +1 -1
- data/lib/svg_conform.rb +11 -2
- data/spec/svg_conform/commands/svgcheck_compare_command_spec.rb +1 -0
- data/spec/svg_conform/commands/svgcheck_compatibility_command_spec.rb +1 -0
- data/spec/svg_conform/commands/svgcheck_generate_command_spec.rb +1 -0
- data/spec/svg_conform/references/integration_spec.rb +206 -0
- data/spec/svg_conform/references/reference_classifier_spec.rb +142 -0
- data/spec/svg_conform/references/reference_manifest_spec.rb +307 -0
- data/spec/svg_conform/requirements/id_reference_state_spec.rb +93 -0
- data/spec/svg_conform/validator_input_types_spec.rb +172 -0
- metadata +17 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 509d5c50283abbefea59a0b96788976e4eeadf89664b337f035656be0545bd3e
|
|
4
|
+
data.tar.gz: 9e7825a05599868518fbe2626040f49cd94faa41647d4a46587d28d0bc999435
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dbb90a922b23519170b187b0c4c1fa64e620333a8501d5f1d3e89318baf7eb163c4fc2131683a5b367775e9b31ec008c8db38cb9aa7a759d9a4806b882a33486
|
|
7
|
+
data.tar.gz: 13408a2c9d5a59fda73f42687d6b3235a854c2ea03fc4601343558cbad34b812ec1af5bb3c005766c43c33e516942580b39784b5b01c29ecf24f454f520062f8
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,41 +1,93 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2025-11-
|
|
3
|
+
# on 2025-11-22 09:57:32 UTC using RuboCop version 1.81.1.
|
|
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
|
+
# Offense count: 3
|
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
12
|
+
# SupportedStyles: with_first_argument, with_fixed_indentation
|
|
13
|
+
Layout/ArgumentAlignment:
|
|
14
|
+
Exclude:
|
|
15
|
+
- 'lib/svg_conform/document.rb'
|
|
16
|
+
- 'lib/svg_conform/remediations/namespace_attribute_remediation.rb'
|
|
17
|
+
|
|
18
|
+
# Offense count: 5
|
|
10
19
|
# This cop supports safe autocorrection (--autocorrect).
|
|
11
20
|
# Configuration parameters: EnforcedStyleAlignWith.
|
|
12
21
|
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
|
13
22
|
Layout/BlockAlignment:
|
|
14
23
|
Exclude:
|
|
15
24
|
- 'spec/svg_conform/profiles/svg_1_2_rfc_profile_spec.rb'
|
|
25
|
+
- 'spec/svg_conform/requirements/id_reference_state_spec.rb'
|
|
26
|
+
- 'test_remove_ns.rb'
|
|
27
|
+
- 'test_reparse_ns.rb'
|
|
28
|
+
- 'test_string_remove_ns.rb'
|
|
29
|
+
|
|
30
|
+
# Offense count: 3
|
|
31
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
32
|
+
Layout/BlockEndNewline:
|
|
33
|
+
Exclude:
|
|
34
|
+
- 'benchmark_validation.rb'
|
|
35
|
+
- 'spec/svg_conform/requirements/id_reference_state_spec.rb'
|
|
16
36
|
|
|
17
37
|
# Offense count: 1
|
|
18
38
|
# This cop supports safe autocorrection (--autocorrect).
|
|
19
39
|
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
|
|
20
40
|
Layout/ExtraSpacing:
|
|
21
41
|
Exclude:
|
|
22
|
-
- 'lib/svg_conform/
|
|
42
|
+
- 'lib/svg_conform/document.rb'
|
|
23
43
|
|
|
24
|
-
# Offense count:
|
|
44
|
+
# Offense count: 7
|
|
25
45
|
# This cop supports safe autocorrection (--autocorrect).
|
|
26
|
-
# Configuration parameters:
|
|
27
|
-
|
|
28
|
-
Layout/IndentationConsistency:
|
|
46
|
+
# Configuration parameters: Width, AllowedPatterns.
|
|
47
|
+
Layout/IndentationWidth:
|
|
29
48
|
Exclude:
|
|
30
|
-
- '
|
|
49
|
+
- 'benchmark_validation.rb'
|
|
50
|
+
- 'spec/svg_conform/requirements/id_reference_state_spec.rb'
|
|
51
|
+
- 'test_remove_ns.rb'
|
|
52
|
+
- 'test_reparse_ns.rb'
|
|
53
|
+
- 'test_string_remove_ns.rb'
|
|
31
54
|
|
|
32
|
-
# Offense count:
|
|
55
|
+
# Offense count: 657
|
|
33
56
|
# This cop supports safe autocorrection (--autocorrect).
|
|
34
57
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
|
|
35
58
|
# URISchemes: http, https
|
|
36
59
|
Layout/LineLength:
|
|
37
60
|
Enabled: false
|
|
38
61
|
|
|
62
|
+
# Offense count: 2
|
|
63
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
64
|
+
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator, EnforcedStyleForRationalLiterals.
|
|
65
|
+
# SupportedStylesForExponentOperator: space, no_space
|
|
66
|
+
# SupportedStylesForRationalLiterals: space, no_space
|
|
67
|
+
Layout/SpaceAroundOperators:
|
|
68
|
+
Exclude:
|
|
69
|
+
- 'debug_lucid_detailed.rb'
|
|
70
|
+
- 'debug_namespace_rem.rb'
|
|
71
|
+
|
|
72
|
+
# Offense count: 2
|
|
73
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
74
|
+
# Configuration parameters: EnforcedStyle.
|
|
75
|
+
# SupportedStyles: final_newline, final_blank_line
|
|
76
|
+
Layout/TrailingEmptyLines:
|
|
77
|
+
Exclude:
|
|
78
|
+
- 'examples/document_input_demo.rb'
|
|
79
|
+
- 'spec/svg_conform/validator_input_types_spec.rb'
|
|
80
|
+
|
|
81
|
+
# Offense count: 5
|
|
82
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
83
|
+
# Configuration parameters: AllowInHeredoc.
|
|
84
|
+
Layout/TrailingWhitespace:
|
|
85
|
+
Exclude:
|
|
86
|
+
- 'debug_moxml_ns.rb'
|
|
87
|
+
- 'lib/svg_conform/document.rb'
|
|
88
|
+
- 'lib/svg_conform/remediations/namespace_attribute_remediation.rb'
|
|
89
|
+
- 'test_remove_ns.rb'
|
|
90
|
+
|
|
39
91
|
# Offense count: 2
|
|
40
92
|
# Configuration parameters: AllowedMethods.
|
|
41
93
|
# AllowedMethods: enums
|
|
@@ -48,6 +100,7 @@ Lint/ConstantDefinitionInBlock:
|
|
|
48
100
|
Lint/DuplicateBranch:
|
|
49
101
|
Exclude:
|
|
50
102
|
- 'lib/svg_conform/profile.rb'
|
|
103
|
+
- 'lib/svg_conform/references/reference_classifier.rb'
|
|
51
104
|
- 'lib/svg_conform/remediations/font_embedding_remediation.rb'
|
|
52
105
|
- 'lib/svg_conform/remediations/image_embedding_remediation.rb'
|
|
53
106
|
- 'lib/svg_conform/report_comparator.rb'
|
|
@@ -80,15 +133,22 @@ Lint/UnreachableCode:
|
|
|
80
133
|
Exclude:
|
|
81
134
|
- 'lib/svg_conform/commands/check.rb'
|
|
82
135
|
|
|
136
|
+
# Offense count: 1
|
|
137
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
138
|
+
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
|
139
|
+
Lint/UnusedBlockArgument:
|
|
140
|
+
Exclude:
|
|
141
|
+
- 'benchmark_validation.rb'
|
|
142
|
+
|
|
83
143
|
# Offense count: 1
|
|
84
144
|
# This cop supports safe autocorrection (--autocorrect).
|
|
85
145
|
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
|
|
86
146
|
# NotImplementedExceptions: NotImplementedError
|
|
87
147
|
Lint/UnusedMethodArgument:
|
|
88
148
|
Exclude:
|
|
89
|
-
- '
|
|
149
|
+
- 'benchmark_validation.rb'
|
|
90
150
|
|
|
91
|
-
# Offense count:
|
|
151
|
+
# Offense count: 151
|
|
92
152
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
93
153
|
Metrics/AbcSize:
|
|
94
154
|
Enabled: false
|
|
@@ -104,12 +164,12 @@ Metrics/BlockLength:
|
|
|
104
164
|
Metrics/BlockNesting:
|
|
105
165
|
Max: 4
|
|
106
166
|
|
|
107
|
-
# Offense count:
|
|
167
|
+
# Offense count: 128
|
|
108
168
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
109
169
|
Metrics/CyclomaticComplexity:
|
|
110
170
|
Enabled: false
|
|
111
171
|
|
|
112
|
-
# Offense count:
|
|
172
|
+
# Offense count: 268
|
|
113
173
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
114
174
|
Metrics/MethodLength:
|
|
115
175
|
Max: 154
|
|
@@ -119,7 +179,7 @@ Metrics/MethodLength:
|
|
|
119
179
|
Metrics/ParameterLists:
|
|
120
180
|
Max: 9
|
|
121
181
|
|
|
122
|
-
# Offense count:
|
|
182
|
+
# Offense count: 103
|
|
123
183
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
124
184
|
Metrics/PerceivedComplexity:
|
|
125
185
|
Enabled: false
|
|
@@ -138,7 +198,20 @@ Performance/CollectionLiteralInLoop:
|
|
|
138
198
|
- 'lib/svg_conform/batch_report.rb'
|
|
139
199
|
- 'lib/svg_conform/compatibility/pattern_discovery.rb'
|
|
140
200
|
|
|
141
|
-
# Offense count:
|
|
201
|
+
# Offense count: 1
|
|
202
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
203
|
+
Performance/RedundantBlockCall:
|
|
204
|
+
Exclude:
|
|
205
|
+
- 'benchmark_validation.rb'
|
|
206
|
+
|
|
207
|
+
# Offense count: 1
|
|
208
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
209
|
+
# Configuration parameters: OnlySumOrWithInitialValue.
|
|
210
|
+
Performance/Sum:
|
|
211
|
+
Exclude:
|
|
212
|
+
- 'benchmark_validation.rb'
|
|
213
|
+
|
|
214
|
+
# Offense count: 9
|
|
142
215
|
# Configuration parameters: IgnoredMetadata.
|
|
143
216
|
RSpec/DescribeClass:
|
|
144
217
|
Exclude:
|
|
@@ -154,9 +227,10 @@ RSpec/DescribeClass:
|
|
|
154
227
|
- 'spec/svg_conform/profiles/no_external_css_profile_spec.rb'
|
|
155
228
|
- 'spec/svg_conform/profiles/svg_1_2_rfc_profile_spec.rb'
|
|
156
229
|
- 'spec/svg_conform/profiles/svg_1_2_rfc_with_rdf_profile_spec.rb'
|
|
230
|
+
- 'spec/svg_conform/references/integration_spec.rb'
|
|
157
231
|
- 'spec/svgcheck_compatibility_spec.rb'
|
|
158
232
|
|
|
159
|
-
# Offense count:
|
|
233
|
+
# Offense count: 136
|
|
160
234
|
# Configuration parameters: CountAsOne.
|
|
161
235
|
RSpec/ExampleLength:
|
|
162
236
|
Max: 53
|
|
@@ -166,20 +240,39 @@ RSpec/LeakyConstantDeclaration:
|
|
|
166
240
|
Exclude:
|
|
167
241
|
- 'spec/svg_conform/profiles/svg_1_2_rfc_profile_spec.rb'
|
|
168
242
|
|
|
243
|
+
# Offense count: 2
|
|
244
|
+
# Configuration parameters: .
|
|
245
|
+
# SupportedStyles: have_received, receive
|
|
246
|
+
RSpec/MessageSpies:
|
|
247
|
+
EnforcedStyle: receive
|
|
248
|
+
|
|
169
249
|
# Offense count: 1
|
|
170
250
|
RSpec/MultipleDescribes:
|
|
171
251
|
Exclude:
|
|
172
252
|
- 'spec/svg_conform/batch_report_spec.rb'
|
|
173
253
|
|
|
174
|
-
# Offense count:
|
|
254
|
+
# Offense count: 111
|
|
175
255
|
RSpec/MultipleExpectations:
|
|
176
|
-
Max:
|
|
256
|
+
Max: 8
|
|
177
257
|
|
|
178
258
|
# Offense count: 1
|
|
179
259
|
Rake/MethodDefinitionInTask:
|
|
180
260
|
Exclude:
|
|
181
261
|
- 'lib/tasks/svgcheck.rake'
|
|
182
262
|
|
|
263
|
+
# Offense count: 5
|
|
264
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
265
|
+
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
|
266
|
+
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
|
267
|
+
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
|
268
|
+
# FunctionalMethods: let, let!, subject, watch
|
|
269
|
+
# AllowedMethods: lambda, proc, it
|
|
270
|
+
Style/BlockDelimiters:
|
|
271
|
+
Exclude:
|
|
272
|
+
- 'benchmark_validation.rb'
|
|
273
|
+
- 'spec/svg_conform/requirements/id_reference_state_spec.rb'
|
|
274
|
+
- 'spec/svg_conform/validator_input_types_spec.rb'
|
|
275
|
+
|
|
183
276
|
# Offense count: 2
|
|
184
277
|
# This cop supports safe autocorrection (--autocorrect).
|
|
185
278
|
# Configuration parameters: EnforcedStyle, AllowComments.
|
|
@@ -196,11 +289,28 @@ Style/EmptyElse:
|
|
|
196
289
|
Style/FormatStringToken:
|
|
197
290
|
EnforcedStyle: unannotated
|
|
198
291
|
|
|
292
|
+
# Offense count: 2
|
|
293
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
294
|
+
# Configuration parameters: AllowedReceivers.
|
|
295
|
+
# AllowedReceivers: Thread.current
|
|
296
|
+
Style/HashEachMethods:
|
|
297
|
+
Exclude:
|
|
298
|
+
- 'benchmark_validation.rb'
|
|
299
|
+
|
|
199
300
|
# Offense count: 1
|
|
200
301
|
Style/MissingRespondToMissing:
|
|
201
302
|
Exclude:
|
|
202
303
|
- 'lib/svg_conform/cli.rb'
|
|
203
304
|
|
|
305
|
+
# Offense count: 5
|
|
306
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
307
|
+
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
|
|
308
|
+
# SupportedStyles: predicate, comparison
|
|
309
|
+
Style/NumericPredicate:
|
|
310
|
+
Exclude:
|
|
311
|
+
- 'spec/**/*'
|
|
312
|
+
- 'benchmark_validation.rb'
|
|
313
|
+
|
|
204
314
|
# Offense count: 4
|
|
205
315
|
# Configuration parameters: AllowedMethods.
|
|
206
316
|
# AllowedMethods: respond_to_missing?
|
|
@@ -218,7 +328,58 @@ Style/RedundantCondition:
|
|
|
218
328
|
|
|
219
329
|
# Offense count: 3
|
|
220
330
|
# This cop supports safe autocorrection (--autocorrect).
|
|
221
|
-
|
|
222
|
-
Style/RedundantReturn:
|
|
331
|
+
Style/RedundantParentheses:
|
|
223
332
|
Exclude:
|
|
224
|
-
- '
|
|
333
|
+
- 'benchmark_validation.rb'
|
|
334
|
+
|
|
335
|
+
# Offense count: 3
|
|
336
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
337
|
+
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
|
|
338
|
+
# AllowedMethods: present?, blank?, presence, try, try!
|
|
339
|
+
Style/SafeNavigation:
|
|
340
|
+
Exclude:
|
|
341
|
+
- 'test_remove_ns.rb'
|
|
342
|
+
- 'test_reparse_ns.rb'
|
|
343
|
+
- 'test_string_remove_ns.rb'
|
|
344
|
+
|
|
345
|
+
# Offense count: 6
|
|
346
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
347
|
+
# Configuration parameters: Mode.
|
|
348
|
+
Style/StringConcatenation:
|
|
349
|
+
Exclude:
|
|
350
|
+
- 'benchmark_validation.rb'
|
|
351
|
+
- 'examples/document_input_demo.rb'
|
|
352
|
+
|
|
353
|
+
# Offense count: 23
|
|
354
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
355
|
+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
|
356
|
+
# SupportedStyles: single_quotes, double_quotes
|
|
357
|
+
Style/StringLiterals:
|
|
358
|
+
Exclude:
|
|
359
|
+
- 'debug_lucid_detailed.rb'
|
|
360
|
+
- 'debug_lucid_test.rb'
|
|
361
|
+
- 'debug_moxml_attrs.rb'
|
|
362
|
+
- 'debug_moxml_ns.rb'
|
|
363
|
+
- 'debug_namespace_rem.rb'
|
|
364
|
+
- 'lib/svg_conform/document.rb'
|
|
365
|
+
- 'lib/svg_conform/remediations/namespace_attribute_remediation.rb'
|
|
366
|
+
- 'test_remove_ns.rb'
|
|
367
|
+
- 'test_reparse_ns.rb'
|
|
368
|
+
- 'test_string_remove_ns.rb'
|
|
369
|
+
|
|
370
|
+
# Offense count: 6
|
|
371
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
372
|
+
# Configuration parameters: EnforcedStyle.
|
|
373
|
+
# SupportedStyles: single_quotes, double_quotes
|
|
374
|
+
Style/StringLiteralsInInterpolation:
|
|
375
|
+
Exclude:
|
|
376
|
+
- 'benchmark_validation.rb'
|
|
377
|
+
- 'examples/document_input_demo.rb'
|
|
378
|
+
|
|
379
|
+
# Offense count: 1
|
|
380
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
381
|
+
# Configuration parameters: EnforcedStyleForMultiline.
|
|
382
|
+
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
|
|
383
|
+
Style/TrailingCommaInHashLiteral:
|
|
384
|
+
Exclude:
|
|
385
|
+
- 'benchmark_validation.rb'
|