ea 0.6.155 → 0.6.157

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 (62) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +423 -0
  3. data/config/qea_schema.yml +2 -0
  4. data/lib/ea/ocl/parser.rb +2 -2
  5. data/lib/ea/qea/benchmark.rb +4 -4
  6. data/lib/ea/qea/factory/association_builder.rb +1 -1
  7. data/lib/ea/qea/factory/association_transformer.rb +2 -2
  8. data/lib/ea/qea/factory/attribute_transformer.rb +1 -1
  9. data/lib/ea/qea/factory/base_transformer.rb +2 -20
  10. data/lib/ea/qea/factory/constraint_transformer.rb +1 -1
  11. data/lib/ea/qea/factory/data_type_transformer.rb +1 -1
  12. data/lib/ea/qea/factory/diagram_transformer.rb +3 -3
  13. data/lib/ea/qea/factory/document_builder.rb +3 -3
  14. data/lib/ea/qea/factory/ea_to_uml_factory.rb +2 -2
  15. data/lib/ea/qea/factory/enum_transformer.rb +3 -2
  16. data/lib/ea/qea/factory/generalization_builder.rb +6 -4
  17. data/lib/ea/qea/factory/generalization_transformer.rb +1 -1
  18. data/lib/ea/qea/factory/instance_transformer.rb +1 -1
  19. data/lib/ea/qea/factory/operation_transformer.rb +1 -1
  20. data/lib/ea/qea/factory/package_transformer.rb +1 -1
  21. data/lib/ea/qea/file_detector.rb +2 -2
  22. data/lib/ea/qea/infrastructure/table_reader.rb +2 -2
  23. data/lib/ea/qea/models/ea_xref.rb +1 -1
  24. data/lib/ea/qea/repositories/base_repository.rb +1 -1
  25. data/lib/ea/qea/rules/cardinality.rb +78 -0
  26. data/lib/ea/qea/rules/enum_literal.rb +22 -0
  27. data/lib/ea/qea/rules/generalization.rb +39 -0
  28. data/lib/ea/qea/rules/visibility.rb +35 -0
  29. data/lib/ea/qea/rules.rb +22 -0
  30. data/lib/ea/qea/services/configuration.rb +16 -2
  31. data/lib/ea/qea/services/database_loader.rb +2 -2
  32. data/lib/ea/qea/validation/association_validator.rb +2 -2
  33. data/lib/ea/qea/validation/attribute_validator.rb +2 -2
  34. data/lib/ea/qea/validation/base_validator.rb +3 -3
  35. data/lib/ea/qea/validation/class_validator.rb +3 -3
  36. data/lib/ea/qea/validation/database/circular_reference_validator.rb +3 -3
  37. data/lib/ea/qea/validation/database/orphan_validator.rb +4 -4
  38. data/lib/ea/qea/validation/database/referential_integrity_validator.rb +3 -3
  39. data/lib/ea/qea/validation/diagram_validator.rb +3 -3
  40. data/lib/ea/qea/validation/formatters/json_formatter.rb +2 -2
  41. data/lib/ea/qea/validation/formatters/text_formatter.rb +4 -4
  42. data/lib/ea/qea/validation/operation_validator.rb +2 -2
  43. data/lib/ea/qea/validation/package_validator.rb +3 -3
  44. data/lib/ea/qea/validation/validation_engine.rb +5 -5
  45. data/lib/ea/qea/validation/validation_message.rb +1 -1
  46. data/lib/ea/qea/verification/comparison_result.rb +4 -4
  47. data/lib/ea/qea/verification/document_normalizer.rb +3 -3
  48. data/lib/ea/qea/verification/document_verifier.rb +3 -3
  49. data/lib/ea/qea/verification/element_comparator.rb +5 -5
  50. data/lib/ea/qea/verification/structure_matcher.rb +4 -4
  51. data/lib/ea/qea.rb +2 -1
  52. data/lib/ea/rtf.rb +2 -2
  53. data/lib/ea/sources/qea/classifier_builder.rb +4 -8
  54. data/lib/ea/sources/qea/operation_builder.rb +1 -6
  55. data/lib/ea/sources/qea/property_builder.rb +1 -7
  56. data/lib/ea/svg/ea_emitter/text_renderer.rb +1 -1
  57. data/lib/ea/theme/loader.rb +0 -2
  58. data/lib/ea/transformers/qea_to_xmi/cardinality.rb +7 -35
  59. data/lib/ea/transformers/qea_to_xmi/extension_serializer.rb +2 -2
  60. data/lib/ea/version.rb +1 -1
  61. data/lib/ea/xmi/parser.rb +25 -25
  62. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 838acb9ce3423d6bcbe536a55cd8c9eee4ced364eb8d68c7282c4d8d375997cb
4
- data.tar.gz: e63343ad128aa29c791cbb94a759737586cdc558f8905ed78e05b493854396b5
3
+ metadata.gz: 6dc96499eda7e7e00d094b14bcdfb74065393cdf50cd8d94f68d7f55fde5c90a
4
+ data.tar.gz: ac1c9f0fb6d51492794a1d81f6fdcc7621d5b836a60f42b0d96caf340748fc2e
5
5
  SHA512:
6
- metadata.gz: 70b2bf8539289daed5ea6a129b1118d56c8ade2a92bb123cfd2d1631f695bd8af99d161b66917d61934e6c6152ddab331e72ac1f66f0e5f6ff07c521c1179d51
7
- data.tar.gz: 9153b33a49e4f4a7ed491ad33f0baec4d754da4b10ecf86f055857bfc08189a4c5c1ea7e60d163a1678b42d5fca98606bcca481b2eaf34e3e9f7db2c05fdffe3
6
+ metadata.gz: 28d00e969d3d5514bf8746837d56b196939a3a5e658637c5732819fde12338dec71e6b5a2ed42abd6bcdc4db3c57e966c6476cca8ae87e7c598da4708a837bdf
7
+ data.tar.gz: 0dc728b0b85172c523beac9bc3d9018f73d72939095ac56fda9aa1e7fbb92c3c81e212f3a3e987f4fa3a6130a7c5dfaa5b43506c734745081d3fb09f8d74d62e
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,423 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2026-11-25 03:27:39 UTC using RuboCop version 1.92.3.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # This cop supports safe autocorrection (--autocorrect).
11
+ # Configuration parameters: EnforcedStyleAlignWith.
12
+ # SupportedStylesAlignWith: either, start_of_block, start_of_line
13
+ Layout/BlockAlignment:
14
+ Exclude:
15
+ - 'lib/ea/qea/validation/formatters/json_formatter.rb'
16
+
17
+ # Offense count: 1
18
+ # This cop supports safe autocorrection (--autocorrect).
19
+ # Configuration parameters: IndentationWidth.
20
+ Layout/ClosingParenthesisIndentation:
21
+ Exclude:
22
+ - 'lib/ea/qea/validation/attribute_validator.rb'
23
+
24
+ # Offense count: 1
25
+ # This cop supports safe autocorrection (--autocorrect).
26
+ # Configuration parameters: EnforcedStyle.
27
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
28
+ Layout/EmptyLinesAroundModuleBody:
29
+ Exclude:
30
+ - 'lib/ea/transformers/qea_to_xmi/cardinality.rb'
31
+
32
+ # Offense count: 1
33
+ Lint/BinaryOperatorWithIdenticalOperands:
34
+ Exclude:
35
+ - 'spec/ea/qea/lookup_tables_spec.rb'
36
+
37
+ # Offense count: 35
38
+ # Configuration parameters: AllowedMethods.
39
+ # AllowedMethods: enums
40
+ Lint/ConstantDefinitionInBlock:
41
+ Enabled: false
42
+
43
+ # Offense count: 13
44
+ # This cop supports safe autocorrection (--autocorrect).
45
+ Lint/CopDirectiveSyntax:
46
+ Exclude:
47
+ - 'lib/ea/xmi/liquid_drops/attribute_drop.rb'
48
+ - 'lib/ea/xmi/liquid_drops/data_type_drop.rb'
49
+ - 'lib/ea/xmi/liquid_drops/generalization_attribute_drop.rb'
50
+ - 'lib/ea/xmi/liquid_drops/klass_drop.rb'
51
+ - 'spec/ea/qea/verification/comprehensive_equivalence_spec.rb'
52
+ - 'spec/ea/qea/verification/equivalence_integration_spec.rb'
53
+
54
+ # Offense count: 2
55
+ # Configuration parameters: DelegatingMethods, AllowedCrossFilePaths.
56
+ # DelegatingMethods: delegate
57
+ Lint/DuplicateMethods:
58
+ Exclude:
59
+ - 'lib/ea/lint/lint_rule.rb'
60
+ - 'lib/ea/svg/ea_emitter/markers.rb'
61
+
62
+ # Offense count: 1
63
+ # This cop supports safe autocorrection (--autocorrect).
64
+ # Configuration parameters: AllowComments.
65
+ Lint/EmptyConditionalBody:
66
+ Exclude:
67
+ - 'spec/ea/qea/verification/equivalence_integration_spec.rb'
68
+
69
+ # Offense count: 1
70
+ Lint/HashCompareByIdentity:
71
+ Exclude:
72
+ - 'lib/ea/export/json_schema/generator.rb'
73
+
74
+ # Offense count: 2
75
+ # This cop supports safe autocorrection (--autocorrect).
76
+ Lint/IdentityComparison:
77
+ Exclude:
78
+ - 'lib/ea/cli/command/info.rb'
79
+ - 'lib/ea/export/xsd/generator.rb'
80
+
81
+ # Offense count: 6
82
+ Lint/IneffectiveAccessModifier:
83
+ Exclude:
84
+ - 'lib/ea/cli/command/export.rb'
85
+ - 'lib/ea/svg/ea_emitter/element/package_shape_renderer.rb'
86
+ - 'lib/ea/svg/ea_emitter/text_renderer.rb'
87
+
88
+ # Offense count: 2
89
+ # Configuration parameters: AllowedParentClasses.
90
+ Lint/MissingSuper:
91
+ Exclude:
92
+ - 'lib/ea/xmi/slicer.rb'
93
+
94
+ # Offense count: 11
95
+ # This cop supports safe autocorrection (--autocorrect).
96
+ Lint/RedundantCopDisableDirective:
97
+ Exclude:
98
+ - 'lib/ea/xmi/liquid_drops/attribute_drop.rb'
99
+ - 'lib/ea/xmi/liquid_drops/data_type_drop.rb'
100
+ - 'lib/ea/xmi/liquid_drops/generalization_attribute_drop.rb'
101
+ - 'lib/ea/xmi/liquid_drops/klass_drop.rb'
102
+ - 'spec/ea/qea/verification/comprehensive_equivalence_spec.rb'
103
+ - 'spec/ea/qea/verification/equivalence_integration_spec.rb'
104
+
105
+ # Offense count: 1
106
+ # This cop supports unsafe autocorrection (--autocorrect-all).
107
+ # Configuration parameters: AllowedMethods, InferNonNilReceiver, AdditionalNilMethods.
108
+ # AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal?
109
+ # AdditionalNilMethods: present?, blank?, try, try!
110
+ Lint/RedundantSafeNavigation:
111
+ Exclude:
112
+ - 'lib/ea/svg/ea_emitter/compartment/note_text.rb'
113
+
114
+ # Offense count: 6
115
+ # This cop supports safe autocorrection (--autocorrect).
116
+ Lint/ScriptPermission:
117
+ Exclude:
118
+ - 'examples/lur_basic_usage.rb'
119
+ - 'examples/lur_cli_workflow.rb'
120
+ - 'examples/lur_statistics.rb'
121
+ - 'examples/qea_standalone_query.rb'
122
+ - 'examples/qea_to_repository.rb'
123
+ - 'examples/smoke_test_real_qea.rb'
124
+
125
+ # Offense count: 10
126
+ Lint/StructNewOverride:
127
+ Exclude:
128
+ - 'lib/ea/mdg/document.rb'
129
+ - 'lib/ea/spa/skeleton.rb'
130
+ - 'lib/ea/svg/ea_emitter/render_context.rb'
131
+ - 'spec/ea/export/xsd/generator_spec.rb'
132
+ - 'spec/ea/ocl/ocl_spec.rb'
133
+ - 'spec/ea/sources/qea/context_diagram_support_spec.rb'
134
+
135
+ # Offense count: 1
136
+ # Configuration parameters: AllowKeywordBlockArguments.
137
+ Lint/UnderscorePrefixedVariableName:
138
+ Exclude:
139
+ - 'lib/ea/fonts/metrics.rb'
140
+
141
+ # Offense count: 6
142
+ # This cop supports safe autocorrection (--autocorrect).
143
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
144
+ # NotImplementedExceptions: NotImplementedError
145
+ Lint/UnusedMethodArgument:
146
+ Exclude:
147
+ - 'lib/ea/svg/ea_emitter/element/icon_renderer.rb'
148
+ - 'lib/ea/svg/ea_emitter/label/end_label.rb'
149
+ - 'lib/ea/svg/ea_emitter/marker/kind.rb'
150
+ - 'lib/ea/svg/ea_emitter/marker/open_triangle.rb'
151
+ - 'lib/ea/svg/ea_emitter/marker/plus.rb'
152
+
153
+ # Offense count: 7
154
+ # This cop supports safe autocorrection (--autocorrect).
155
+ # Configuration parameters: CheckForMethodsWithNoSideEffects.
156
+ Lint/Void:
157
+ Exclude:
158
+ - 'lib/ea/cli/output.rb'
159
+ - 'lib/ea/svg/ea_emitter/marker.rb'
160
+
161
+ # Offense count: 302
162
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
163
+ Metrics/AbcSize:
164
+ Max: 175
165
+
166
+ # Offense count: 491
167
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
168
+ # AllowedMethods: refine
169
+ Metrics/BlockLength:
170
+ Max: 708
171
+
172
+ # Offense count: 49
173
+ # Configuration parameters: CountComments, CountAsOne.
174
+ Metrics/ClassLength:
175
+ Max: 897
176
+
177
+ # Offense count: 146
178
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
179
+ Metrics/CyclomaticComplexity:
180
+ Max: 81
181
+
182
+ # Offense count: 358
183
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
184
+ Metrics/MethodLength:
185
+ Max: 153
186
+
187
+ # Offense count: 8
188
+ # Configuration parameters: CountComments, CountAsOne.
189
+ Metrics/ModuleLength:
190
+ Max: 931
191
+
192
+ # Offense count: 67
193
+ # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
194
+ Metrics/ParameterLists:
195
+ Max: 33
196
+
197
+ # Offense count: 109
198
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
199
+ Metrics/PerceivedComplexity:
200
+ Max: 83
201
+
202
+ # Offense count: 1
203
+ Naming/AccessorMethodName:
204
+ Exclude:
205
+ - 'lib/ea/xmi/parser.rb'
206
+
207
+ # Offense count: 5
208
+ # This cop supports unsafe autocorrection (--autocorrect-all).
209
+ # Configuration parameters: EnforcedStyleForLeadingUnderscores.
210
+ # SupportedStylesForLeadingUnderscores: disallowed, required, optional
211
+ Naming/MemoizedInstanceVariableName:
212
+ Exclude:
213
+ - 'lib/ea/qea/validation/validation_engine.rb'
214
+ - 'lib/ea/sources/xmi/stereotype_builder.rb'
215
+ - 'lib/ea/sources/xmi/tag_builder.rb'
216
+ - 'spec/ea/svg/ea_emitter/document_spec.rb'
217
+
218
+ # Offense count: 1
219
+ # Configuration parameters: EnforcedStyle, AllowedPatterns, ForbiddenIdentifiers, ForbiddenPatterns.
220
+ # SupportedStyles: snake_case, camelCase
221
+ # ForbiddenIdentifiers: __id__, __send__
222
+ Naming/MethodName:
223
+ Exclude:
224
+ - 'spec/ea/svg/ea_emitter/compartment_spec.rb'
225
+
226
+ # Offense count: 80
227
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
228
+ # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
229
+ Naming/MethodParameterName:
230
+ Enabled: false
231
+
232
+ # Offense count: 17
233
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros, UseSorbetSigs.
234
+ # NamePrefix: is_, has_, have_, does_
235
+ # ForbiddenPrefixes: is_, has_, have_, does_
236
+ # AllowedMethods: is_a?
237
+ # MethodDefinitionMacros: define_method, define_singleton_method
238
+ Naming/PredicatePrefix:
239
+ Exclude:
240
+ - 'spec/**/*'
241
+ - 'lib/ea/qea/models/ea_datatype.rb'
242
+ - 'lib/ea/qea/models/ea_document.rb'
243
+ - 'lib/ea/qea/models/ea_script.rb'
244
+ - 'lib/ea/qea/validation/validation_result.rb'
245
+ - 'lib/ea/qea/verification/comparison_result.rb'
246
+ - 'lib/ea/svg/ea_emitter/element/package_shape_renderer.rb'
247
+ - 'lib/ea/svg/ea_emitter/elements.rb'
248
+ - 'lib/ea/xmi/liquid_drops/data_type_drop.rb'
249
+ - 'lib/ea/xmi/liquid_drops/generalization_attribute_drop.rb'
250
+ - 'lib/ea/xmi/liquid_drops/generalization_drop.rb'
251
+ - 'lib/ea/xmi/liquid_drops/klass_drop.rb'
252
+
253
+ # Offense count: 1
254
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
255
+ # SupportedStyles: snake_case, normalcase, non_integer
256
+ # AllowedIdentifiers: TLS1_1, TLS1_2, capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
257
+ Naming/VariableNumber:
258
+ Exclude:
259
+ - 'spec/ea/svg/ea_emitter/color_resolver_spec.rb'
260
+
261
+ # Offense count: 24
262
+ # This cop supports unsafe autocorrection (--autocorrect-all).
263
+ Style/CommentedKeyword:
264
+ Exclude:
265
+ - 'lib/ea/xmi/parser.rb'
266
+
267
+ # Offense count: 84
268
+ # Configuration parameters: AllowedConstants.
269
+ Style/Documentation:
270
+ Enabled: false
271
+
272
+ # Offense count: 5
273
+ # This cop supports unsafe autocorrection (--autocorrect-all).
274
+ # Configuration parameters: EnforcedStyle.
275
+ # SupportedStyles: allowed_in_returns, forbidden
276
+ Style/DoubleNegation:
277
+ Exclude:
278
+ - 'lib/ea/qea/factory/generalization_builder.rb'
279
+ - 'lib/ea/xmi/liquid_drops/connector_drop.rb'
280
+ - 'lib/ea/xmi/parser.rb'
281
+
282
+ # Offense count: 1
283
+ # This cop supports unsafe autocorrection (--autocorrect-all).
284
+ # Configuration parameters: EnforcedStyle.
285
+ # SupportedStyles: left_coerce, right_coerce, single_coerce, fdiv
286
+ Style/FloatDivision:
287
+ Exclude:
288
+ - 'lib/ea/svg/parity/checker.rb'
289
+
290
+ # Offense count: 2
291
+ # This cop supports safe autocorrection (--autocorrect).
292
+ # Configuration parameters: EnforcedStyle.
293
+ # SupportedStyles: format, sprintf, percent
294
+ Style/FormatString:
295
+ Exclude:
296
+ - 'spec/ea/fonts/metrics_spec.rb'
297
+
298
+ # Offense count: 8
299
+ # This cop supports safe autocorrection (--autocorrect).
300
+ # Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, Mode, AllowedMethods, AllowedPatterns.
301
+ # SupportedStyles: annotated, template, unannotated
302
+ Style/FormatStringToken:
303
+ Exclude:
304
+ - 'lib/ea/svg/ea_emitter/element/bcol_decoder.rb'
305
+ - 'lib/tasks/fonts.rake'
306
+
307
+ # Offense count: 8
308
+ # This cop supports unsafe autocorrection (--autocorrect-all).
309
+ # Configuration parameters: EnforcedStyle.
310
+ # SupportedStyles: always, always_true, never
311
+ Style/FrozenStringLiteralComment:
312
+ Exclude:
313
+ - '**/*.arb'
314
+ - 'spec/ea/mdg/loader_spec.rb'
315
+ - 'spec/ea/mdg/mdg_technology_format_spec.rb'
316
+ - 'spec/ea/mdg/registry_spec.rb'
317
+ - 'spec/ea/qea/models/auxiliary_models_spec.rb'
318
+ - 'spec/ea/svg/ea_emitter/element/text_escape_spec.rb'
319
+ - 'spec/ea/svg/ea_emitter/font_resolver_spec.rb'
320
+ - 'spec/ea/svg/ea_emitter/ghost_labels_spec.rb'
321
+ - 'spec/ea/svg/ea_emitter/marker/package_import_spec.rb'
322
+
323
+ # Offense count: 1
324
+ # This cop supports unsafe autocorrection (--autocorrect-all).
325
+ # Configuration parameters: AllowedReceivers.
326
+ # AllowedReceivers: Thread.current
327
+ Style/HashEachMethods:
328
+ Exclude:
329
+ - 'lib/tasks/fonts.rake'
330
+
331
+ # Offense count: 4
332
+ # This cop supports unsafe autocorrection (--autocorrect-all).
333
+ Style/IdenticalConditionalBranches:
334
+ Exclude:
335
+ - 'lib/ea/sources/qea/diagram_builder.rb'
336
+ - 'lib/ea/svg/ea_emitter/element/operation_renderer.rb'
337
+
338
+ # Offense count: 22
339
+ # This cop supports safe autocorrection (--autocorrect).
340
+ Style/IfUnlessModifier:
341
+ Exclude:
342
+ - 'lib/ea/fonts/metrics.rb'
343
+ - 'lib/ea/qea/factory/generalization_transformer.rb'
344
+ - 'lib/ea/qea/verification/element_comparator.rb'
345
+ - 'lib/ea/sources/qea/diagram_builder.rb'
346
+ - 'lib/ea/sources/qea/diagram_builder/auto_routing.rb'
347
+ - 'lib/ea/sources/qea/diagram_builder/routing.rb'
348
+ - 'lib/ea/sources/xmi/diagram_builder.rb'
349
+ - 'lib/ea/sources/xmi/stored_route.rb'
350
+ - 'lib/ea/svg/ea_emitter/connector_redock.rb'
351
+ - 'lib/ea/svg/ea_emitter/label/end_label.rb'
352
+ - 'spec/ea/qea/verification/comprehensive_equivalence_spec.rb'
353
+
354
+ # Offense count: 1
355
+ # This cop supports unsafe autocorrection (--autocorrect-all).
356
+ # Configuration parameters: InverseMethods, InverseBlocks.
357
+ Style/InverseMethods:
358
+ Exclude:
359
+ - 'lib/ea/svg/ea_emitter/elements.rb'
360
+
361
+ # Offense count: 4
362
+ Style/MultilineBlockChain:
363
+ Exclude:
364
+ - 'examples/lur_statistics.rb'
365
+ - 'lib/ea/query/builder.rb'
366
+ - 'lib/ea/svg/ea_emitter/markers.rb'
367
+ - 'spec/ea/export/xsd/generator_spec.rb'
368
+
369
+ # Offense count: 2
370
+ # This cop supports unsafe autocorrection (--autocorrect-all).
371
+ # Configuration parameters: EnforcedStyle, Recursive.
372
+ # SupportedStyles: literals, strict
373
+ Style/MutableConstant:
374
+ Exclude:
375
+ - 'lib/ea/svg/ea_emitter/element/icon_renderer.rb'
376
+ - 'lib/ea/svg/ea_emitter/text_renderer.rb'
377
+
378
+ # Offense count: 6
379
+ # This cop supports unsafe autocorrection (--autocorrect-all).
380
+ # Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
381
+ # SupportedStyles: predicate, comparison
382
+ Style/NumericPredicate:
383
+ Exclude:
384
+ - 'spec/**/*'
385
+ - 'lib/ea/sources/qea/diagram_builder.rb'
386
+ - 'lib/ea/xmi/slicer.rb'
387
+
388
+ # Offense count: 6
389
+ # This cop supports unsafe autocorrection (--autocorrect-all).
390
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
391
+ # AllowedMethods: present?, blank?, presence, try, try!
392
+ Style/SafeNavigation:
393
+ Exclude:
394
+ - 'lib/ea/sources/qea/classifier_builder.rb'
395
+ - 'lib/ea/svg/ea_emitter/compartment/header_divider.rb'
396
+ - 'lib/ea/svg/ea_emitter/compartment/note_text.rb'
397
+ - 'lib/ea/svg/ea_emitter/compartment/shape.rb'
398
+ - 'lib/ea/svg/ea_emitter/element/stereotype_icon_renderer.rb'
399
+ - 'lib/ea/xref_format/stereotype_application.rb'
400
+
401
+ # Offense count: 5
402
+ # This cop supports unsafe autocorrection (--autocorrect-all).
403
+ # Configuration parameters: Mode.
404
+ Style/StringConcatenation:
405
+ Exclude:
406
+ - 'lib/ea/export/plantuml/generator.rb'
407
+ - 'lib/ea/svg/ea_emitter/compartment/note_text.rb'
408
+ - 'lib/ea/svg/ea_emitter/label/midpoint_label.rb'
409
+ - 'spec/ea/transformers/qea_to_xmi/extension_serializer_spec.rb'
410
+ - 'spec/support/svg_canonicalizer.rb'
411
+
412
+ # Offense count: 1
413
+ # This cop supports unsafe autocorrection (--autocorrect-all).
414
+ Style/StructInheritance:
415
+ Exclude:
416
+ - 'lib/ea/svg/ea_emitter/render_context.rb'
417
+
418
+ # Offense count: 45
419
+ # This cop supports safe autocorrection (--autocorrect).
420
+ # Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
421
+ # URISchemes: http, https
422
+ Layout/LineLength:
423
+ Max: 465
@@ -922,6 +922,8 @@ tables:
922
922
  primary_key: ImageID
923
923
  collection_name: images
924
924
  description: "Embedded images (EMF/WMF bitmaps) for diagrams"
925
+ blob_columns:
926
+ - Image
925
927
  columns:
926
928
  - name: ImageID
927
929
  type: INTEGER
data/lib/ea/ocl/parser.rb CHANGED
@@ -33,7 +33,7 @@ module Ea
33
33
  end
34
34
 
35
35
  # Parse one expression. Returns a single AST node.
36
- def parse_expression(source) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
36
+ def parse_expression(source)
37
37
  s = source.strip
38
38
 
39
39
  # Strip outer parens
@@ -144,7 +144,7 @@ module Ea
144
144
  nil
145
145
  end
146
146
 
147
- def find_top_level_op(source, op) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
147
+ def find_top_level_op(source, op)
148
148
  depth = 0
149
149
  i = 0
150
150
  while i < source.length
@@ -21,7 +21,7 @@ module Ea
21
21
  # puts "QEA: #{results[:qea][:time]}s"
22
22
  # puts "XMI: #{results[:xmi][:time]}s"
23
23
  # puts "Speedup: #{results[:speedup]}x"
24
- def compare(qea_path, xmi_path) # rubocop:disable Metrics/MethodLength
24
+ def compare(qea_path, xmi_path)
25
25
  qea_result = measure_qea(qea_path)
26
26
  xmi_result = measure_xmi(xmi_path)
27
27
 
@@ -48,7 +48,7 @@ module Ea
48
48
  # result = Ea::Qea::Benchmark.measure_qea("model.qea")
49
49
  # puts "Time: #{result[:time]}s"
50
50
  # puts "Packages: #{result[:stats][:packages]}"
51
- def measure_qea(path) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
51
+ def measure_qea(path)
52
52
  return { error: "File not found: #{path}" } unless File.exist?(path)
53
53
 
54
54
  result = {
@@ -94,7 +94,7 @@ module Ea
94
94
  # @example
95
95
  # result = Ea::Qea::Benchmark.measure_xmi("model.xmi")
96
96
  # puts "Time: #{result[:time]}s"
97
- def measure_xmi(path) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
97
+ def measure_xmi(path)
98
98
  return { error: "File not found: #{path}" } unless File.exist?(path)
99
99
 
100
100
  result = {
@@ -138,7 +138,7 @@ module Ea
138
138
  #
139
139
  # @param results [Hash] Results from compare method
140
140
  # @return [String] Formatted text
141
- def format_results(results) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
141
+ def format_results(results)
142
142
  return results[:error] if results[:error]
143
143
 
144
144
  output = []
@@ -43,7 +43,7 @@ module Ea
43
43
  end
44
44
  end
45
45
 
46
- def create_association_attribute( # rubocop:disable Metrics/ParameterLists
46
+ def create_association_attribute(
47
47
  name:, type:, type_xmi_id:,
48
48
  association_xmi_id:, cardinality:, definition:,
49
49
  gen_name:, name_ns:, type_ns:, is_src: true
@@ -8,11 +8,11 @@ module Ea
8
8
  # Transform EA connector to UML association
9
9
  # @param ea_connector [EaConnector] EA connector model
10
10
  # @return [Lutaml::Uml::Association] UML association
11
- def transform(ea_connector) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
11
+ def transform(ea_connector)
12
12
  return nil if ea_connector.nil?
13
13
  return nil unless ea_connector.association?
14
14
 
15
- Lutaml::Uml::Association.new.tap do |assoc| # rubocop:disable Metrics/BlockLength
15
+ Lutaml::Uml::Association.new.tap do |assoc|
16
16
  # Map basic properties
17
17
  assoc.name = ea_connector.name unless
18
18
  ea_connector.name.nil? || ea_connector.name.empty?
@@ -8,7 +8,7 @@ module Ea
8
8
  # Transform EA attribute to UML attribute
9
9
  # @param ea_attribute [EaAttribute] EA attribute model
10
10
  # @return [Lutaml::Uml::TopElementAttribute] UML attribute
11
- def transform(ea_attribute) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength
11
+ def transform(ea_attribute)
12
12
  return nil if ea_attribute.nil?
13
13
 
14
14
  Lutaml::Uml::TopElementAttribute.new.tap do |attr|
@@ -36,14 +36,7 @@ module Ea
36
36
  # @param ea_visibility [String] EA visibility value
37
37
  # @return [String] UML visibility value
38
38
  def map_visibility(ea_visibility)
39
- return "public" if ea_visibility.nil? || ea_visibility.empty?
40
-
41
- case ea_visibility.downcase
42
- when "private" then "private"
43
- when "protected" then "protected"
44
- when "package" then "package"
45
- else "public"
46
- end
39
+ Ea::Qea::Rules::Visibility.canonical(ea_visibility)
47
40
  end
48
41
 
49
42
  # Parse cardinality string to min/max values
@@ -51,18 +44,7 @@ module Ea
51
44
  # "1..*")
52
45
  # @return [Hash] Hash with :min and :max keys
53
46
  def parse_cardinality(cardinality_str)
54
- return { min: nil, max: nil } if cardinality_str.nil? ||
55
- cardinality_str.empty?
56
-
57
- parts = cardinality_str.split("..")
58
- if parts.size == 2
59
- { min: parts[0], max: parts[1] }
60
- elsif parts.size == 1
61
- # EA bare "*" means unbounded (0..*)
62
- { min: parts[0] == "*" ? "0" : parts[0], max: parts[0] }
63
- else
64
- { min: nil, max: nil }
65
- end
47
+ Ea::Qea::Rules::Cardinality.parse(cardinality_str)
66
48
  end
67
49
 
68
50
  # Convert boolean-like values to actual boolean
@@ -24,7 +24,7 @@ module Ea
24
24
  #
25
25
  # @param ea_constraint [Models::EaObjectConstraint] EA constraint model
26
26
  # @return [Lutaml::Uml::Constraint, nil] UML constraint or nil
27
- def transform(ea_constraint) # rubocop:disable Metrics/AbcSize
27
+ def transform(ea_constraint)
28
28
  return nil unless ea_constraint
29
29
 
30
30
  Lutaml::Uml::Constraint.new.tap do |constraint|
@@ -8,7 +8,7 @@ module Ea
8
8
  # Transform EA object to UML data type
9
9
  # @param ea_object [EaObject] EA object model
10
10
  # @return [Lutaml::Uml::DataType] UML data type
11
- def transform(ea_object) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
11
+ def transform(ea_object)
12
12
  return nil if ea_object.nil?
13
13
  return nil unless ea_object.data_type?
14
14
 
@@ -12,7 +12,7 @@ module Ea
12
12
  # Transform EA diagram to UML diagram
13
13
  # @param ea_diagram [EaDiagram] EA diagram model
14
14
  # @return [Lutaml::Uml::Diagram] UML diagram
15
- def transform(ea_diagram) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity,Metrics/MethodLength
15
+ def transform(ea_diagram)
16
16
  return nil if ea_diagram.nil?
17
17
 
18
18
  Lutaml::Uml::Diagram.new.tap do |diagram|
@@ -78,7 +78,7 @@ module Ea
78
78
  # Transform EA diagram object to UML diagram object
79
79
  # @param ea_obj [Models::EaDiagramObject] EA diagram object
80
80
  # @return [Lutaml::Uml::DiagramObject] UML diagram object
81
- def transform_diagram_object(ea_obj) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
81
+ def transform_diagram_object(ea_obj)
82
82
  return nil if ea_obj.nil?
83
83
 
84
84
  Lutaml::Uml::DiagramObject.new.tap do |obj|
@@ -117,7 +117,7 @@ module Ea
117
117
  # Transform EA diagram link to UML diagram link
118
118
  # @param ea_link [Models::EaDiagramLink] EA diagram link
119
119
  # @return [Lutaml::Uml::DiagramLink] UML diagram link
120
- def transform_diagram_link(ea_link) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
120
+ def transform_diagram_link(ea_link)
121
121
  return nil if ea_link.nil?
122
122
 
123
123
  Lutaml::Uml::DiagramLink.new.tap do |link|
@@ -159,7 +159,7 @@ module Ea
159
159
 
160
160
  # Collect all xmi_ids from document
161
161
  # @return [Array<String>] All xmi_ids
162
- def collect_all_xmi_ids # rubocop:disable Metrics/AbcSize
162
+ def collect_all_xmi_ids
163
163
  ids = []
164
164
 
165
165
  # Collect from top-level elements
@@ -180,7 +180,7 @@ module Ea
180
180
  # Recursively collect all xmi_ids from a package and its descendants
181
181
  # @param package [Lutaml::Uml::Package] Package to collect from
182
182
  # @return [Array<String>] All xmi_ids in package hierarchy
183
- def collect_package_xmi_ids(package) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
183
+ def collect_package_xmi_ids(package)
184
184
  ids = []
185
185
 
186
186
  # Collect from package's elements
@@ -199,7 +199,7 @@ module Ea
199
199
 
200
200
  # Check that all association references are valid
201
201
  # @param warnings [Array<String>] Warning accumulator
202
- def check_association_references(warnings) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
202
+ def check_association_references(warnings)
203
203
  return if @document.associations.empty?
204
204
 
205
205
  all_xmi_ids = collect_all_xmi_ids.to_set
@@ -24,7 +24,7 @@ module Ea
24
24
 
25
25
  # Create complete UML document from EA database
26
26
  # @return [Lutaml::Uml::Document] Complete UML document
27
- def create_document # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
27
+ def create_document
28
28
  builder = DocumentBuilder.new(
29
29
  name: options[:document_name] || "EA Model"
30
30
  )
@@ -61,7 +61,7 @@ module Ea
61
61
 
62
62
  # Transform all packages with hierarchy
63
63
  # @return [Array<Lutaml::Uml::Package>] Root packages
64
- def transform_packages # rubocop:disable Metrics/MethodLength
64
+ def transform_packages
65
65
  root_packages = database.packages.select do |pkg|
66
66
  pkg.parent_id.nil? || pkg.parent_id.zero?
67
67
  end
@@ -39,8 +39,9 @@ module Ea
39
39
  private
40
40
 
41
41
  def enum?(ea_object)
42
- ea_object.enumeration? ||
43
- (ea_object.stereotype && ea_object.stereotype.downcase == "enumeration")
42
+ Ea::Qea::Rules::EnumLiteral.enumeration?(
43
+ ea_object.object_type, ea_object.stereotype
44
+ )
44
45
  end
45
46
 
46
47
  def valid_stereotype?(ea_object)