svg_conform 0.1.3 → 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 +99 -320
- 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 +29 -8
- 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 +31 -1
- 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 +70 -11
- 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,32 +1,19 @@
|
|
|
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
10
|
# This cop supports safe autocorrection (--autocorrect).
|
|
11
11
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
12
12
|
# SupportedStyles: with_first_argument, with_fixed_indentation
|
|
13
13
|
Layout/ArgumentAlignment:
|
|
14
14
|
Exclude:
|
|
15
|
-
- '
|
|
16
|
-
- 'lib/svg_conform/
|
|
17
|
-
- 'lib/svg_conform/requirements/namespace_attributes_requirement.rb'
|
|
18
|
-
- 'lib/svg_conform/sax_validation_handler.rb'
|
|
19
|
-
- 'spec/support/shared_examples_for_validation_modes.rb'
|
|
20
|
-
|
|
21
|
-
# Offense count: 5
|
|
22
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
23
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
24
|
-
# SupportedStyles: with_first_element, with_fixed_indentation
|
|
25
|
-
Layout/ArrayAlignment:
|
|
26
|
-
Exclude:
|
|
27
|
-
- 'lib/svg_conform/requirements/color_restrictions_requirement.rb'
|
|
28
|
-
- 'lib/svg_conform/requirements/id_reference_requirement.rb'
|
|
29
|
-
- 'lib/svg_conform/requirements/invalid_id_references_requirement.rb'
|
|
15
|
+
- 'lib/svg_conform/document.rb'
|
|
16
|
+
- 'lib/svg_conform/remediations/namespace_attribute_remediation.rb'
|
|
30
17
|
|
|
31
18
|
# Offense count: 5
|
|
32
19
|
# This cop supports safe autocorrection (--autocorrect).
|
|
@@ -34,180 +21,72 @@ Layout/ArrayAlignment:
|
|
|
34
21
|
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
|
35
22
|
Layout/BlockAlignment:
|
|
36
23
|
Exclude:
|
|
37
|
-
- 'benchmark_bsi_samples.rb'
|
|
38
|
-
- 'check_position_collisions.rb'
|
|
39
|
-
- 'check_unique_positions.rb'
|
|
40
|
-
- 'lib/svg_conform/requirements/allowed_elements_requirement.rb'
|
|
41
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'
|
|
42
29
|
|
|
43
|
-
# Offense count:
|
|
30
|
+
# Offense count: 3
|
|
44
31
|
# This cop supports safe autocorrection (--autocorrect).
|
|
45
32
|
Layout/BlockEndNewline:
|
|
46
33
|
Exclude:
|
|
47
|
-
- '
|
|
48
|
-
- '
|
|
49
|
-
- 'check_position_collisions.rb'
|
|
50
|
-
- 'check_unique_positions.rb'
|
|
51
|
-
- 'compare_errors.rb'
|
|
52
|
-
- 'find_missing_errors.rb'
|
|
53
|
-
- 'lib/svg_conform/requirements/allowed_elements_requirement.rb'
|
|
54
|
-
|
|
55
|
-
# Offense count: 4
|
|
56
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
57
|
-
# Configuration parameters: AllowForAlignment.
|
|
58
|
-
Layout/CommentIndentation:
|
|
59
|
-
Exclude:
|
|
60
|
-
- 'lib/svg_conform/requirements/namespace_attributes_requirement.rb'
|
|
61
|
-
- 'lib/svg_conform/validation_context.rb'
|
|
62
|
-
|
|
63
|
-
# Offense count: 2
|
|
64
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
65
|
-
Layout/ElseAlignment:
|
|
66
|
-
Exclude:
|
|
67
|
-
- 'lib/svg_conform/requirements/namespace_attributes_requirement.rb'
|
|
68
|
-
|
|
69
|
-
# Offense count: 17
|
|
70
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
71
|
-
Layout/EmptyLineAfterGuardClause:
|
|
72
|
-
Exclude:
|
|
73
|
-
- 'analyze_error_nodes.rb'
|
|
74
|
-
- 'check_duplicates.rb'
|
|
75
|
-
- 'check_position_collisions.rb'
|
|
76
|
-
- 'check_unique_positions.rb'
|
|
77
|
-
- 'compare_errors.rb'
|
|
78
|
-
- 'debug_object_ids.rb'
|
|
79
|
-
- 'debug_utf8.rb'
|
|
80
|
-
- 'find_all_elements.rb'
|
|
81
|
-
- 'find_missing_errors.rb'
|
|
82
|
-
- 'lib/svg_conform/fast_document_analyzer.rb'
|
|
83
|
-
- 'lib/svg_conform/node_index_builder.rb'
|
|
84
|
-
- 'lib/svg_conform/requirements/id_reference_requirement.rb'
|
|
85
|
-
- 'lib/svg_conform/sax_validation_handler.rb'
|
|
86
|
-
|
|
87
|
-
# Offense count: 1
|
|
88
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
89
|
-
# Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, DefLikeMacros, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
|
|
90
|
-
Layout/EmptyLineBetweenDefs:
|
|
91
|
-
Exclude:
|
|
92
|
-
- 'lib/svg_conform/requirements/namespace_attributes_requirement.rb'
|
|
93
|
-
|
|
94
|
-
# Offense count: 1
|
|
95
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
96
|
-
Layout/EmptyLines:
|
|
97
|
-
Exclude:
|
|
98
|
-
- 'lib/svg_conform/requirements/namespace_attributes_requirement.rb'
|
|
34
|
+
- 'benchmark_validation.rb'
|
|
35
|
+
- 'spec/svg_conform/requirements/id_reference_state_spec.rb'
|
|
99
36
|
|
|
100
37
|
# Offense count: 1
|
|
101
38
|
# This cop supports safe autocorrection (--autocorrect).
|
|
102
|
-
Layout/EmptyLinesAroundMethodBody:
|
|
103
|
-
Exclude:
|
|
104
|
-
- 'lib/svg_conform/fast_document_analyzer.rb'
|
|
105
|
-
|
|
106
|
-
# Offense count: 2
|
|
107
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
108
|
-
# Configuration parameters: EnforcedStyleAlignWith, Severity.
|
|
109
|
-
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
|
110
|
-
Layout/EndAlignment:
|
|
111
|
-
Exclude:
|
|
112
|
-
- 'lib/svg_conform/requirements/namespace_attributes_requirement.rb'
|
|
113
|
-
|
|
114
|
-
# Offense count: 22
|
|
115
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
116
39
|
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
|
|
117
40
|
Layout/ExtraSpacing:
|
|
118
41
|
Exclude:
|
|
119
|
-
- '
|
|
120
|
-
- 'find_missing_errors.rb'
|
|
121
|
-
- 'lib/svg_conform/element_proxy.rb'
|
|
122
|
-
- 'lib/svg_conform/requirements/id_reference_requirement.rb'
|
|
123
|
-
- 'lib/svg_conform/requirements/invalid_id_references_requirement.rb'
|
|
124
|
-
- 'lib/svg_conform/sax_validation_handler.rb'
|
|
125
|
-
- 'lib/svg_conform/validation_context.rb'
|
|
126
|
-
- 'lib/svg_conform/validator.rb'
|
|
127
|
-
|
|
128
|
-
# Offense count: 2
|
|
129
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
130
|
-
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
|
131
|
-
# SupportedHashRocketStyles: key, separator, table
|
|
132
|
-
# SupportedColonStyles: key, separator, table
|
|
133
|
-
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
|
134
|
-
Layout/HashAlignment:
|
|
135
|
-
Exclude:
|
|
136
|
-
- 'benchmark_bsi_samples.rb'
|
|
137
|
-
- 'final_demo.rb'
|
|
42
|
+
- 'lib/svg_conform/document.rb'
|
|
138
43
|
|
|
139
|
-
# Offense count:
|
|
140
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
141
|
-
Layout/HeredocIndentation:
|
|
142
|
-
Exclude:
|
|
143
|
-
- 'test_sax_basic.rb'
|
|
144
|
-
|
|
145
|
-
# Offense count: 8
|
|
146
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
147
|
-
# Configuration parameters: EnforcedStyle.
|
|
148
|
-
# SupportedStyles: normal, indented_internal_methods
|
|
149
|
-
Layout/IndentationConsistency:
|
|
150
|
-
Exclude:
|
|
151
|
-
- 'check_duplicates.rb'
|
|
152
|
-
- 'compare_dom_sax.rb'
|
|
153
|
-
- 'compare_errors.rb'
|
|
154
|
-
- 'find_missing_errors.rb'
|
|
155
|
-
- 'lib/svg_conform/validation_context.rb'
|
|
156
|
-
|
|
157
|
-
# Offense count: 13
|
|
44
|
+
# Offense count: 7
|
|
158
45
|
# This cop supports safe autocorrection (--autocorrect).
|
|
159
46
|
# Configuration parameters: Width, AllowedPatterns.
|
|
160
47
|
Layout/IndentationWidth:
|
|
161
48
|
Exclude:
|
|
162
|
-
- '
|
|
163
|
-
- '
|
|
164
|
-
- '
|
|
165
|
-
- '
|
|
166
|
-
- '
|
|
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'
|
|
167
54
|
|
|
168
|
-
# Offense count:
|
|
55
|
+
# Offense count: 657
|
|
169
56
|
# This cop supports safe autocorrection (--autocorrect).
|
|
170
57
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
|
|
171
58
|
# URISchemes: http, https
|
|
172
59
|
Layout/LineLength:
|
|
173
60
|
Enabled: false
|
|
174
61
|
|
|
175
|
-
# Offense count:
|
|
176
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
177
|
-
Layout/MultilineBlockLayout:
|
|
178
|
-
Exclude:
|
|
179
|
-
- 'check_duplicates.rb'
|
|
180
|
-
- 'compare_errors.rb'
|
|
181
|
-
- 'find_missing_errors.rb'
|
|
182
|
-
|
|
183
|
-
# Offense count: 28
|
|
62
|
+
# Offense count: 2
|
|
184
63
|
# This cop supports safe autocorrection (--autocorrect).
|
|
185
64
|
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator, EnforcedStyleForRationalLiterals.
|
|
186
65
|
# SupportedStylesForExponentOperator: space, no_space
|
|
187
66
|
# SupportedStylesForRationalLiterals: space, no_space
|
|
188
67
|
Layout/SpaceAroundOperators:
|
|
189
68
|
Exclude:
|
|
190
|
-
- '
|
|
191
|
-
- '
|
|
192
|
-
- 'check_clippath_font.rb'
|
|
193
|
-
- 'check_unique_positions.rb'
|
|
194
|
-
- 'count_elements.rb'
|
|
195
|
-
- 'final_demo.rb'
|
|
196
|
-
- 'test_remediation.rb'
|
|
69
|
+
- 'debug_lucid_detailed.rb'
|
|
70
|
+
- 'debug_namespace_rem.rb'
|
|
197
71
|
|
|
198
|
-
# Offense count:
|
|
72
|
+
# Offense count: 2
|
|
199
73
|
# This cop supports safe autocorrection (--autocorrect).
|
|
200
74
|
# Configuration parameters: EnforcedStyle.
|
|
201
75
|
# SupportedStyles: final_newline, final_blank_line
|
|
202
76
|
Layout/TrailingEmptyLines:
|
|
203
77
|
Exclude:
|
|
204
|
-
- '
|
|
78
|
+
- 'examples/document_input_demo.rb'
|
|
79
|
+
- 'spec/svg_conform/validator_input_types_spec.rb'
|
|
205
80
|
|
|
206
|
-
# Offense count:
|
|
81
|
+
# Offense count: 5
|
|
207
82
|
# This cop supports safe autocorrection (--autocorrect).
|
|
208
83
|
# Configuration parameters: AllowInHeredoc.
|
|
209
84
|
Layout/TrailingWhitespace:
|
|
210
|
-
|
|
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'
|
|
211
90
|
|
|
212
91
|
# Offense count: 2
|
|
213
92
|
# Configuration parameters: AllowedMethods.
|
|
@@ -216,10 +95,12 @@ Lint/ConstantDefinitionInBlock:
|
|
|
216
95
|
Exclude:
|
|
217
96
|
- 'spec/svg_conform/profiles/svg_1_2_rfc_profile_spec.rb'
|
|
218
97
|
|
|
219
|
-
# Offense count:
|
|
98
|
+
# Offense count: 22
|
|
220
99
|
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
|
|
221
100
|
Lint/DuplicateBranch:
|
|
222
101
|
Exclude:
|
|
102
|
+
- 'lib/svg_conform/profile.rb'
|
|
103
|
+
- 'lib/svg_conform/references/reference_classifier.rb'
|
|
223
104
|
- 'lib/svg_conform/remediations/font_embedding_remediation.rb'
|
|
224
105
|
- 'lib/svg_conform/remediations/image_embedding_remediation.rb'
|
|
225
106
|
- 'lib/svg_conform/report_comparator.rb'
|
|
@@ -239,12 +120,6 @@ Lint/DuplicateMethods:
|
|
|
239
120
|
- 'lib/svg_conform/sax_validation_handler.rb'
|
|
240
121
|
- 'lib/svg_conform/validation_context.rb'
|
|
241
122
|
|
|
242
|
-
# Offense count: 1
|
|
243
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
244
|
-
Lint/IdentityComparison:
|
|
245
|
-
Exclude:
|
|
246
|
-
- 'lib/svg_conform/fast_document_analyzer.rb'
|
|
247
|
-
|
|
248
123
|
# Offense count: 4
|
|
249
124
|
# Configuration parameters: AllowedParentClasses.
|
|
250
125
|
Lint/MissingSuper:
|
|
@@ -253,46 +128,27 @@ Lint/MissingSuper:
|
|
|
253
128
|
- 'lib/svg_conform/compatibility/validity_analysis.rb'
|
|
254
129
|
- 'lib/svg_conform/sax_validation_handler.rb'
|
|
255
130
|
|
|
256
|
-
# Offense count:
|
|
257
|
-
|
|
258
|
-
# Configuration parameters: AllowedMethods, InferNonNilReceiver, AdditionalNilMethods.
|
|
259
|
-
# AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal?
|
|
260
|
-
# AdditionalNilMethods: present?, blank?, try, try!
|
|
261
|
-
Lint/RedundantSafeNavigation:
|
|
131
|
+
# Offense count: 1
|
|
132
|
+
Lint/UnreachableCode:
|
|
262
133
|
Exclude:
|
|
263
|
-
- '
|
|
264
|
-
- 'lib/svg_conform/fast_document_analyzer.rb'
|
|
134
|
+
- 'lib/svg_conform/commands/check.rb'
|
|
265
135
|
|
|
266
136
|
# Offense count: 1
|
|
267
137
|
# This cop supports safe autocorrection (--autocorrect).
|
|
268
|
-
|
|
138
|
+
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
|
139
|
+
Lint/UnusedBlockArgument:
|
|
269
140
|
Exclude:
|
|
270
|
-
- '
|
|
141
|
+
- 'benchmark_validation.rb'
|
|
271
142
|
|
|
272
143
|
# Offense count: 1
|
|
273
|
-
Lint/UnreachableCode:
|
|
274
|
-
Exclude:
|
|
275
|
-
- 'lib/svg_conform/commands/check.rb'
|
|
276
|
-
|
|
277
|
-
# Offense count: 4
|
|
278
144
|
# This cop supports safe autocorrection (--autocorrect).
|
|
279
145
|
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
|
|
280
146
|
# NotImplementedExceptions: NotImplementedError
|
|
281
147
|
Lint/UnusedMethodArgument:
|
|
282
148
|
Exclude:
|
|
283
|
-
- '
|
|
284
|
-
- 'lib/svg_conform/requirements/id_reference_requirement.rb'
|
|
285
|
-
- 'lib/svg_conform/requirements/invalid_id_references_requirement.rb'
|
|
286
|
-
- 'lib/svg_conform/sax_validation_handler.rb'
|
|
287
|
-
|
|
288
|
-
# Offense count: 1
|
|
289
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
290
|
-
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
|
|
291
|
-
Lint/UselessAccessModifier:
|
|
292
|
-
Exclude:
|
|
293
|
-
- 'lib/svg_conform/requirements/namespace_attributes_requirement.rb'
|
|
149
|
+
- 'benchmark_validation.rb'
|
|
294
150
|
|
|
295
|
-
# Offense count:
|
|
151
|
+
# Offense count: 151
|
|
296
152
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
297
153
|
Metrics/AbcSize:
|
|
298
154
|
Enabled: false
|
|
@@ -308,12 +164,12 @@ Metrics/BlockLength:
|
|
|
308
164
|
Metrics/BlockNesting:
|
|
309
165
|
Max: 4
|
|
310
166
|
|
|
311
|
-
# Offense count:
|
|
167
|
+
# Offense count: 128
|
|
312
168
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
313
169
|
Metrics/CyclomaticComplexity:
|
|
314
170
|
Enabled: false
|
|
315
171
|
|
|
316
|
-
# Offense count:
|
|
172
|
+
# Offense count: 268
|
|
317
173
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
318
174
|
Metrics/MethodLength:
|
|
319
175
|
Max: 154
|
|
@@ -323,7 +179,7 @@ Metrics/MethodLength:
|
|
|
323
179
|
Metrics/ParameterLists:
|
|
324
180
|
Max: 9
|
|
325
181
|
|
|
326
|
-
# Offense count:
|
|
182
|
+
# Offense count: 103
|
|
327
183
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
328
184
|
Metrics/PerceivedComplexity:
|
|
329
185
|
Enabled: false
|
|
@@ -342,13 +198,20 @@ Performance/CollectionLiteralInLoop:
|
|
|
342
198
|
- 'lib/svg_conform/batch_report.rb'
|
|
343
199
|
- 'lib/svg_conform/compatibility/pattern_discovery.rb'
|
|
344
200
|
|
|
201
|
+
# Offense count: 1
|
|
202
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
203
|
+
Performance/RedundantBlockCall:
|
|
204
|
+
Exclude:
|
|
205
|
+
- 'benchmark_validation.rb'
|
|
206
|
+
|
|
345
207
|
# Offense count: 1
|
|
346
208
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
347
|
-
|
|
209
|
+
# Configuration parameters: OnlySumOrWithInitialValue.
|
|
210
|
+
Performance/Sum:
|
|
348
211
|
Exclude:
|
|
349
|
-
- '
|
|
212
|
+
- 'benchmark_validation.rb'
|
|
350
213
|
|
|
351
|
-
# Offense count:
|
|
214
|
+
# Offense count: 9
|
|
352
215
|
# Configuration parameters: IgnoredMetadata.
|
|
353
216
|
RSpec/DescribeClass:
|
|
354
217
|
Exclude:
|
|
@@ -364,9 +227,10 @@ RSpec/DescribeClass:
|
|
|
364
227
|
- 'spec/svg_conform/profiles/no_external_css_profile_spec.rb'
|
|
365
228
|
- 'spec/svg_conform/profiles/svg_1_2_rfc_profile_spec.rb'
|
|
366
229
|
- 'spec/svg_conform/profiles/svg_1_2_rfc_with_rdf_profile_spec.rb'
|
|
230
|
+
- 'spec/svg_conform/references/integration_spec.rb'
|
|
367
231
|
- 'spec/svgcheck_compatibility_spec.rb'
|
|
368
232
|
|
|
369
|
-
# Offense count:
|
|
233
|
+
# Offense count: 136
|
|
370
234
|
# Configuration parameters: CountAsOne.
|
|
371
235
|
RSpec/ExampleLength:
|
|
372
236
|
Max: 53
|
|
@@ -376,21 +240,27 @@ RSpec/LeakyConstantDeclaration:
|
|
|
376
240
|
Exclude:
|
|
377
241
|
- 'spec/svg_conform/profiles/svg_1_2_rfc_profile_spec.rb'
|
|
378
242
|
|
|
243
|
+
# Offense count: 2
|
|
244
|
+
# Configuration parameters: .
|
|
245
|
+
# SupportedStyles: have_received, receive
|
|
246
|
+
RSpec/MessageSpies:
|
|
247
|
+
EnforcedStyle: receive
|
|
248
|
+
|
|
379
249
|
# Offense count: 1
|
|
380
250
|
RSpec/MultipleDescribes:
|
|
381
251
|
Exclude:
|
|
382
252
|
- 'spec/svg_conform/batch_report_spec.rb'
|
|
383
253
|
|
|
384
|
-
# Offense count:
|
|
254
|
+
# Offense count: 111
|
|
385
255
|
RSpec/MultipleExpectations:
|
|
386
|
-
Max:
|
|
256
|
+
Max: 8
|
|
387
257
|
|
|
388
258
|
# Offense count: 1
|
|
389
259
|
Rake/MethodDefinitionInTask:
|
|
390
260
|
Exclude:
|
|
391
261
|
- 'lib/tasks/svgcheck.rake'
|
|
392
262
|
|
|
393
|
-
# Offense count:
|
|
263
|
+
# Offense count: 5
|
|
394
264
|
# This cop supports safe autocorrection (--autocorrect).
|
|
395
265
|
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
|
396
266
|
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
|
@@ -399,21 +269,9 @@ Rake/MethodDefinitionInTask:
|
|
|
399
269
|
# AllowedMethods: lambda, proc, it
|
|
400
270
|
Style/BlockDelimiters:
|
|
401
271
|
Exclude:
|
|
402
|
-
- '
|
|
403
|
-
- '
|
|
404
|
-
- '
|
|
405
|
-
- 'check_unique_positions.rb'
|
|
406
|
-
- 'compare_errors.rb'
|
|
407
|
-
- 'find_missing_errors.rb'
|
|
408
|
-
- 'lib/svg_conform/requirements/allowed_elements_requirement.rb'
|
|
409
|
-
|
|
410
|
-
# Offense count: 3
|
|
411
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
412
|
-
Style/CombinableLoops:
|
|
413
|
-
Exclude:
|
|
414
|
-
- 'check_duplicates.rb'
|
|
415
|
-
- 'compare_errors.rb'
|
|
416
|
-
- 'find_missing_errors.rb'
|
|
272
|
+
- 'benchmark_validation.rb'
|
|
273
|
+
- 'spec/svg_conform/requirements/id_reference_state_spec.rb'
|
|
274
|
+
- 'spec/svg_conform/validator_input_types_spec.rb'
|
|
417
275
|
|
|
418
276
|
# Offense count: 2
|
|
419
277
|
# This cop supports safe autocorrection (--autocorrect).
|
|
@@ -431,34 +289,20 @@ Style/EmptyElse:
|
|
|
431
289
|
Style/FormatStringToken:
|
|
432
290
|
EnforcedStyle: unannotated
|
|
433
291
|
|
|
434
|
-
# Offense count:
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
# Offense count: 3
|
|
440
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
441
|
-
Style/MultilineIfModifier:
|
|
292
|
+
# Offense count: 2
|
|
293
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
294
|
+
# Configuration parameters: AllowedReceivers.
|
|
295
|
+
# AllowedReceivers: Thread.current
|
|
296
|
+
Style/HashEachMethods:
|
|
442
297
|
Exclude:
|
|
443
|
-
- '
|
|
444
|
-
- 'lib/svg_conform/sax_validation_handler.rb'
|
|
298
|
+
- 'benchmark_validation.rb'
|
|
445
299
|
|
|
446
300
|
# Offense count: 1
|
|
447
|
-
|
|
448
|
-
Style/MultilineTernaryOperator:
|
|
449
|
-
Exclude:
|
|
450
|
-
- 'lib/svg_conform/requirements/namespace_attributes_requirement.rb'
|
|
451
|
-
|
|
452
|
-
# Offense count: 2
|
|
453
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
454
|
-
# Configuration parameters: EnforcedStyle.
|
|
455
|
-
# SupportedStyles: literals, strict
|
|
456
|
-
Style/MutableConstant:
|
|
301
|
+
Style/MissingRespondToMissing:
|
|
457
302
|
Exclude:
|
|
458
|
-
- '
|
|
459
|
-
- 'test_sax_on_slow_files.rb'
|
|
303
|
+
- 'lib/svg_conform/cli.rb'
|
|
460
304
|
|
|
461
|
-
# Offense count:
|
|
305
|
+
# Offense count: 5
|
|
462
306
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
463
307
|
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
|
|
464
308
|
# SupportedStyles: predicate, comparison
|
|
@@ -466,11 +310,6 @@ Style/NumericPredicate:
|
|
|
466
310
|
Exclude:
|
|
467
311
|
- 'spec/**/*'
|
|
468
312
|
- 'benchmark_validation.rb'
|
|
469
|
-
- 'check_unique_positions.rb'
|
|
470
|
-
- 'compare_dom_sax.rb'
|
|
471
|
-
- 'lib/svg_conform/validation_context.rb'
|
|
472
|
-
- 'test_remediation.rb'
|
|
473
|
-
- 'test_sax_basic.rb'
|
|
474
313
|
|
|
475
314
|
# Offense count: 4
|
|
476
315
|
# Configuration parameters: AllowedMethods.
|
|
@@ -479,12 +318,6 @@ Style/OptionalBooleanParameter:
|
|
|
479
318
|
Exclude:
|
|
480
319
|
- 'lib/svg_conform/semantic_comparator.rb'
|
|
481
320
|
|
|
482
|
-
# Offense count: 1
|
|
483
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
484
|
-
Style/RedundantAssignment:
|
|
485
|
-
Exclude:
|
|
486
|
-
- 'lib/svg_conform/fast_document_analyzer.rb'
|
|
487
|
-
|
|
488
321
|
# Offense count: 1
|
|
489
322
|
# This cop supports safe autocorrection (--autocorrect).
|
|
490
323
|
# Configuration parameters: AllowedMethods.
|
|
@@ -493,26 +326,11 @@ Style/RedundantCondition:
|
|
|
493
326
|
Exclude:
|
|
494
327
|
- 'lib/svg_conform/external_checkers/svgcheck/parser.rb'
|
|
495
328
|
|
|
496
|
-
# Offense count:
|
|
497
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
498
|
-
Style/RedundantInterpolation:
|
|
499
|
-
Exclude:
|
|
500
|
-
- 'analyze_error_nodes.rb'
|
|
501
|
-
|
|
502
|
-
# Offense count: 1
|
|
329
|
+
# Offense count: 3
|
|
503
330
|
# This cop supports safe autocorrection (--autocorrect).
|
|
504
331
|
Style/RedundantParentheses:
|
|
505
332
|
Exclude:
|
|
506
|
-
- '
|
|
507
|
-
|
|
508
|
-
# Offense count: 2
|
|
509
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
510
|
-
# Configuration parameters: EnforcedStyle.
|
|
511
|
-
# SupportedStyles: implicit, explicit
|
|
512
|
-
Style/RescueStandardError:
|
|
513
|
-
Exclude:
|
|
514
|
-
- 'debug_node_coverage.rb'
|
|
515
|
-
- 'test_sax_basic.rb'
|
|
333
|
+
- 'benchmark_validation.rb'
|
|
516
334
|
|
|
517
335
|
# Offense count: 3
|
|
518
336
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
@@ -520,87 +338,48 @@ Style/RescueStandardError:
|
|
|
520
338
|
# AllowedMethods: present?, blank?, presence, try, try!
|
|
521
339
|
Style/SafeNavigation:
|
|
522
340
|
Exclude:
|
|
523
|
-
- '
|
|
524
|
-
- '
|
|
341
|
+
- 'test_remove_ns.rb'
|
|
342
|
+
- 'test_reparse_ns.rb'
|
|
343
|
+
- 'test_string_remove_ns.rb'
|
|
525
344
|
|
|
526
|
-
# Offense count:
|
|
345
|
+
# Offense count: 6
|
|
527
346
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
528
347
|
# Configuration parameters: Mode.
|
|
529
348
|
Style/StringConcatenation:
|
|
530
349
|
Exclude:
|
|
531
|
-
- 'benchmark_bsi_samples.rb'
|
|
532
|
-
- 'benchmark_sax.rb'
|
|
533
350
|
- 'benchmark_validation.rb'
|
|
534
|
-
- '
|
|
535
|
-
- 'test_remediation.rb'
|
|
351
|
+
- 'examples/document_input_demo.rb'
|
|
536
352
|
|
|
537
|
-
# Offense count:
|
|
353
|
+
# Offense count: 23
|
|
538
354
|
# This cop supports safe autocorrection (--autocorrect).
|
|
539
355
|
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
|
540
356
|
# SupportedStyles: single_quotes, double_quotes
|
|
541
357
|
Style/StringLiterals:
|
|
542
|
-
|
|
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'
|
|
543
369
|
|
|
544
|
-
# Offense count:
|
|
370
|
+
# Offense count: 6
|
|
545
371
|
# This cop supports safe autocorrection (--autocorrect).
|
|
546
372
|
# Configuration parameters: EnforcedStyle.
|
|
547
373
|
# SupportedStyles: single_quotes, double_quotes
|
|
548
374
|
Style/StringLiteralsInInterpolation:
|
|
549
375
|
Exclude:
|
|
550
|
-
- 'benchmark_bsi_samples.rb'
|
|
551
|
-
- 'benchmark_sax.rb'
|
|
552
376
|
- 'benchmark_validation.rb'
|
|
553
|
-
- '
|
|
554
|
-
- 'test_remediation.rb'
|
|
555
|
-
|
|
556
|
-
# Offense count: 34
|
|
557
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
558
|
-
# Configuration parameters: EnforcedStyleForMultiline.
|
|
559
|
-
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
|
|
560
|
-
Style/TrailingCommaInArguments:
|
|
561
|
-
Exclude:
|
|
562
|
-
- 'lib/svg_conform/requirements/allowed_elements_requirement.rb'
|
|
563
|
-
- 'lib/svg_conform/requirements/color_restrictions_requirement.rb'
|
|
564
|
-
- 'lib/svg_conform/requirements/font_family_requirement.rb'
|
|
565
|
-
- 'lib/svg_conform/requirements/forbidden_content_requirement.rb'
|
|
566
|
-
- 'lib/svg_conform/requirements/id_reference_requirement.rb'
|
|
567
|
-
- 'lib/svg_conform/requirements/invalid_id_references_requirement.rb'
|
|
568
|
-
- 'lib/svg_conform/requirements/link_validation_requirement.rb'
|
|
569
|
-
- 'lib/svg_conform/requirements/namespace_attributes_requirement.rb'
|
|
570
|
-
- 'lib/svg_conform/requirements/namespace_requirement.rb'
|
|
571
|
-
- 'lib/svg_conform/requirements/no_external_css_requirement.rb'
|
|
572
|
-
- 'lib/svg_conform/requirements/no_external_fonts_requirement.rb'
|
|
573
|
-
- 'lib/svg_conform/requirements/no_external_images_requirement.rb'
|
|
574
|
-
- 'lib/svg_conform/requirements/viewbox_required_requirement.rb'
|
|
575
|
-
- 'lib/svg_conform/sax_validation_handler.rb'
|
|
576
|
-
- 'lib/svg_conform/validator.rb'
|
|
377
|
+
- 'examples/document_input_demo.rb'
|
|
577
378
|
|
|
578
379
|
# Offense count: 1
|
|
579
380
|
# This cop supports safe autocorrection (--autocorrect).
|
|
580
381
|
# Configuration parameters: EnforcedStyleForMultiline.
|
|
581
382
|
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
|
|
582
|
-
Style/TrailingCommaInArrayLiteral:
|
|
583
|
-
Exclude:
|
|
584
|
-
- 'test_sax_on_slow_files.rb'
|
|
585
|
-
|
|
586
|
-
# Offense count: 12
|
|
587
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
588
|
-
# Configuration parameters: EnforcedStyleForMultiline.
|
|
589
|
-
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
|
|
590
383
|
Style/TrailingCommaInHashLiteral:
|
|
591
|
-
Exclude:
|
|
592
|
-
- 'debug_positions.rb'
|
|
593
|
-
- 'lib/svg_conform/requirements/allowed_elements_requirement.rb'
|
|
594
|
-
- 'lib/svg_conform/requirements/color_restrictions_requirement.rb'
|
|
595
|
-
- 'lib/svg_conform/requirements/namespace_requirement.rb'
|
|
596
|
-
- 'lib/svg_conform/requirements/viewbox_required_requirement.rb'
|
|
597
|
-
- 'lib/svg_conform/validator.rb'
|
|
598
|
-
|
|
599
|
-
# Offense count: 4
|
|
600
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
601
|
-
Style/ZeroLengthPredicate:
|
|
602
384
|
Exclude:
|
|
603
385
|
- 'benchmark_validation.rb'
|
|
604
|
-
- 'lib/svg_conform/validation_context.rb'
|
|
605
|
-
- 'test_remediation.rb'
|
|
606
|
-
- 'test_sax_basic.rb'
|