rng 0.1.2 → 0.3.3

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 (180) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/docs.yml +63 -0
  3. data/.github/workflows/release.yml +8 -3
  4. data/.gitignore +11 -0
  5. data/.rubocop.yml +10 -7
  6. data/.rubocop_todo.yml +229 -23
  7. data/CHANGELOG.md +317 -0
  8. data/CLAUDE.md +139 -0
  9. data/Gemfile +11 -12
  10. data/README.adoc +1538 -11
  11. data/Rakefile +11 -3
  12. data/docs/Gemfile +8 -0
  13. data/docs/_config.yml +23 -0
  14. data/docs/getting-started/index.adoc +75 -0
  15. data/docs/guides/error-handling.adoc +137 -0
  16. data/docs/guides/external-references.adoc +128 -0
  17. data/docs/guides/index.adoc +24 -0
  18. data/docs/guides/parsing-rnc.adoc +141 -0
  19. data/docs/guides/parsing-rng-xml.adoc +81 -0
  20. data/docs/guides/rng-to-rnc.adoc +101 -0
  21. data/docs/guides/validation.adoc +85 -0
  22. data/docs/index.adoc +52 -0
  23. data/docs/reference/api.adoc +126 -0
  24. data/docs/reference/cli.adoc +182 -0
  25. data/docs/understanding/architecture.adoc +58 -0
  26. data/docs/understanding/rng-vs-rnc.adoc +118 -0
  27. data/exe/rng +5 -0
  28. data/lib/rng/any_name.rb +10 -8
  29. data/lib/rng/attribute.rb +28 -26
  30. data/lib/rng/choice.rb +24 -24
  31. data/lib/rng/cli.rb +607 -0
  32. data/lib/rng/data.rb +10 -10
  33. data/lib/rng/datatype_declaration.rb +26 -0
  34. data/lib/rng/define.rb +44 -41
  35. data/lib/rng/div.rb +36 -0
  36. data/lib/rng/documentation.rb +9 -0
  37. data/lib/rng/element.rb +39 -37
  38. data/lib/rng/empty.rb +7 -7
  39. data/lib/rng/except.rb +25 -25
  40. data/lib/rng/external_ref.rb +8 -8
  41. data/lib/rng/external_ref_resolver.rb +582 -0
  42. data/lib/rng/foreign_attribute.rb +26 -0
  43. data/lib/rng/foreign_element.rb +33 -0
  44. data/lib/rng/grammar.rb +14 -12
  45. data/lib/rng/group.rb +26 -24
  46. data/lib/rng/include.rb +5 -6
  47. data/lib/rng/include_processor.rb +461 -0
  48. data/lib/rng/interleave.rb +23 -23
  49. data/lib/rng/list.rb +22 -22
  50. data/lib/rng/mixed.rb +23 -23
  51. data/lib/rng/name.rb +7 -7
  52. data/lib/rng/namespace_declaration.rb +47 -0
  53. data/lib/rng/namespaces.rb +15 -0
  54. data/lib/rng/not_allowed.rb +7 -7
  55. data/lib/rng/ns_name.rb +9 -9
  56. data/lib/rng/one_or_more.rb +23 -23
  57. data/lib/rng/optional.rb +23 -23
  58. data/lib/rng/param.rb +8 -8
  59. data/lib/rng/parent_ref.rb +8 -8
  60. data/lib/rng/parse_tree_processor.rb +695 -0
  61. data/lib/rng/pattern.rb +7 -7
  62. data/lib/rng/ref.rb +8 -8
  63. data/lib/rng/rnc_builder.rb +927 -0
  64. data/lib/rng/rnc_parser.rb +605 -305
  65. data/lib/rng/rnc_to_rng_converter.rb +1408 -0
  66. data/lib/rng/schema_preamble.rb +73 -0
  67. data/lib/rng/schema_validator.rb +1622 -0
  68. data/lib/rng/start.rb +27 -25
  69. data/lib/rng/test_suite_parser.rb +168 -0
  70. data/lib/rng/text.rb +11 -8
  71. data/lib/rng/to_rnc.rb +4 -35
  72. data/lib/rng/value.rb +6 -7
  73. data/lib/rng/version.rb +1 -1
  74. data/lib/rng/zero_or_more.rb +23 -23
  75. data/lib/rng.rb +68 -17
  76. data/rng.gemspec +18 -19
  77. data/scripts/extract_spectest_resources.rb +96 -0
  78. data/spec/fixtures/compacttest.xml +2511 -0
  79. data/spec/fixtures/external/circular_a.rng +7 -0
  80. data/spec/fixtures/external/circular_b.rng +7 -0
  81. data/spec/fixtures/external/circular_main.rng +7 -0
  82. data/spec/fixtures/external/external_ref_lib.rng +7 -0
  83. data/spec/fixtures/external/external_ref_main.rng +7 -0
  84. data/spec/fixtures/external/include_lib.rng +7 -0
  85. data/spec/fixtures/external/include_main.rng +3 -0
  86. data/spec/fixtures/external/nested_chain.rng +6 -0
  87. data/spec/fixtures/external/nested_leaf.rng +7 -0
  88. data/spec/fixtures/external/nested_mid.rng +8 -0
  89. data/spec/fixtures/metanorma/3gpp.rnc +35 -0
  90. data/spec/fixtures/metanorma/3gpp.rng +105 -0
  91. data/spec/fixtures/metanorma/basicdoc.rnc +11 -0
  92. data/spec/fixtures/metanorma/bipm.rnc +148 -0
  93. data/spec/fixtures/metanorma/bipm.rng +376 -0
  94. data/spec/fixtures/metanorma/bsi.rnc +104 -0
  95. data/spec/fixtures/metanorma/bsi.rng +332 -0
  96. data/spec/fixtures/metanorma/csa.rnc +45 -0
  97. data/spec/fixtures/metanorma/csa.rng +131 -0
  98. data/spec/fixtures/metanorma/csd.rnc +43 -0
  99. data/spec/fixtures/metanorma/csd.rng +132 -0
  100. data/spec/fixtures/metanorma/gbstandard.rnc +99 -0
  101. data/spec/fixtures/metanorma/gbstandard.rng +316 -0
  102. data/spec/fixtures/metanorma/iec.rnc +49 -0
  103. data/spec/fixtures/metanorma/iec.rng +193 -0
  104. data/spec/fixtures/metanorma/ietf.rnc +275 -0
  105. data/spec/fixtures/metanorma/ietf.rng +925 -0
  106. data/spec/fixtures/metanorma/iho.rnc +58 -0
  107. data/spec/fixtures/metanorma/iho.rng +179 -0
  108. data/spec/fixtures/metanorma/isodoc.rnc +873 -0
  109. data/spec/fixtures/metanorma/isodoc.rng +2704 -0
  110. data/spec/fixtures/metanorma/isostandard-amd.rnc +43 -0
  111. data/spec/fixtures/metanorma/isostandard-amd.rng +108 -0
  112. data/spec/fixtures/metanorma/isostandard.rnc +166 -0
  113. data/spec/fixtures/metanorma/isostandard.rng +494 -0
  114. data/spec/fixtures/metanorma/itu.rnc +122 -0
  115. data/spec/fixtures/metanorma/itu.rng +377 -0
  116. data/spec/fixtures/metanorma/m3d.rnc +41 -0
  117. data/spec/fixtures/metanorma/m3d.rng +122 -0
  118. data/spec/fixtures/metanorma/mpfd.rnc +36 -0
  119. data/spec/fixtures/metanorma/mpfd.rng +95 -0
  120. data/spec/fixtures/metanorma/nist.rnc +77 -0
  121. data/spec/fixtures/metanorma/nist.rng +216 -0
  122. data/spec/fixtures/metanorma/ogc.rnc +51 -0
  123. data/spec/fixtures/metanorma/ogc.rng +151 -0
  124. data/spec/fixtures/metanorma/reqt.rnc +6 -0
  125. data/spec/fixtures/metanorma/rsd.rnc +36 -0
  126. data/spec/fixtures/metanorma/rsd.rng +95 -0
  127. data/spec/fixtures/metanorma/un.rnc +103 -0
  128. data/spec/fixtures/metanorma/un.rng +367 -0
  129. data/spec/fixtures/rnc/base.rnc +4 -0
  130. data/spec/fixtures/rnc/grammar_with_trailing.rnc +8 -0
  131. data/spec/fixtures/rnc/main_include_trailing.rnc +3 -0
  132. data/spec/fixtures/rnc/main_with_include.rnc +5 -0
  133. data/spec/fixtures/rnc/test_augment.rnc +10 -0
  134. data/spec/fixtures/rnc/test_isodoc_simple.rnc +9 -0
  135. data/spec/fixtures/rnc/top_level_include.rnc +8 -0
  136. data/spec/fixtures/spectest_external/case_10_4.7/x +3 -0
  137. data/spec/fixtures/spectest_external/case_10_4.7/y +7 -0
  138. data/spec/fixtures/spectest_external/case_11_4.7/x +3 -0
  139. data/spec/fixtures/spectest_external/case_12_4.7/x +3 -0
  140. data/spec/fixtures/spectest_external/case_13_4.7/x +3 -0
  141. data/spec/fixtures/spectest_external/case_13_4.7/y +3 -0
  142. data/spec/fixtures/spectest_external/case_14_4.7/x +7 -0
  143. data/spec/fixtures/spectest_external/case_15_4.7/x +7 -0
  144. data/spec/fixtures/spectest_external/case_16_4.7/x +5 -0
  145. data/spec/fixtures/spectest_external/case_17_4.7/x +5 -0
  146. data/spec/fixtures/spectest_external/case_18_4.7/x +7 -0
  147. data/spec/fixtures/spectest_external/case_19_4.7/level1.rng +9 -0
  148. data/spec/fixtures/spectest_external/case_19_4.7/level2.rng +7 -0
  149. data/spec/fixtures/spectest_external/case_1_4.5/sub1/x +3 -0
  150. data/spec/fixtures/spectest_external/case_1_4.5/sub3/x +3 -0
  151. data/spec/fixtures/spectest_external/case_1_4.5/x +3 -0
  152. data/spec/fixtures/spectest_external/case_20_4.6/x +3 -0
  153. data/spec/fixtures/spectest_external/case_2_4.5/x +3 -0
  154. data/spec/fixtures/spectest_external/case_3_4.6/x +3 -0
  155. data/spec/fixtures/spectest_external/case_4_4.6/x +3 -0
  156. data/spec/fixtures/spectest_external/case_5_4.6/x +1 -0
  157. data/spec/fixtures/spectest_external/case_6_4.6/x +5 -0
  158. data/spec/fixtures/spectest_external/case_7_4.6/x +1 -0
  159. data/spec/fixtures/spectest_external/case_7_4.6/y +1 -0
  160. data/spec/fixtures/spectest_external/case_8_4.7/x +7 -0
  161. data/spec/fixtures/spectest_external/case_9_4.7/x +7 -0
  162. data/spec/fixtures/spectest_external/resources.json +149 -0
  163. data/spec/rng/advanced_rnc_spec.rb +101 -0
  164. data/spec/rng/compacttest_spec.rb +197 -0
  165. data/spec/rng/datatype_declaration_spec.rb +28 -0
  166. data/spec/rng/div_spec.rb +207 -0
  167. data/spec/rng/external_ref_resolver_spec.rb +122 -0
  168. data/spec/rng/metanorma_conversion_spec.rb +159 -0
  169. data/spec/rng/namespace_declaration_spec.rb +60 -0
  170. data/spec/rng/namespace_support_spec.rb +199 -0
  171. data/spec/rng/rnc_parser_spec.rb +498 -22
  172. data/spec/rng/rnc_roundtrip_spec.rb +96 -82
  173. data/spec/rng/rng_generation_spec.rb +288 -0
  174. data/spec/rng/roundtrip_spec.rb +342 -0
  175. data/spec/rng/schema_preamble_spec.rb +145 -0
  176. data/spec/rng/schema_spec.rb +68 -64
  177. data/spec/rng/spectest_spec.rb +168 -90
  178. data/spec/rng_spec.rb +2 -2
  179. data/spec/spec_helper.rb +7 -42
  180. metadata +141 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6098b94d05fc5d4051353c56c3506280514394551876755c300e3926ba514501
4
- data.tar.gz: 588a13fd65f9aae5c317ff64c69a9d567fdbbe586ca4cf94b8c234888c3a0b11
3
+ metadata.gz: 10c85f9f544d78d663a1f36cffdf7d3bca10fced07581fb5f6d52d63a548c895
4
+ data.tar.gz: 7fb492448f01443ede4f66af235787407bf44846a9d9ac0526fd6d1def565027
5
5
  SHA512:
6
- metadata.gz: 59de0a086d49d26a332e3ffda73eb81b4873ea9ff45ecaf97e78b2fcda7e477650abf726e8be5d1623bcf8176aec74d6c5e4b336d75549f8ea973dba4328d3e8
7
- data.tar.gz: 1bea4dfb461300942a4f677a352ddc5801833bb915ea16656b2cf86ad07e62414c9a0bb426ae765731ce8361e1c0a30348314434c1dcf2dfb7a2d7b031fef479
6
+ metadata.gz: 9e65688496d4bcf2b380b4a8c543847e3e977995b94a4763300f3ca29c19b137c93bfe0de80e8358a292ee196fb76656641d2cdbe51db5624815047fe3a0e905
7
+ data.tar.gz: 1f9fa36285707a5393acdb6a0d1b7fcc5637d63a95c065afbaf5b75bdcefae237aa0fa016f408ede1bf4aba5878b6992fa478a4b7300c2f1315f419233113173
@@ -0,0 +1,63 @@
1
+ name: docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths:
7
+ - 'docs/**'
8
+ pull_request:
9
+ paths:
10
+ - 'docs/**'
11
+ repository_dispatch:
12
+ workflow_dispatch:
13
+
14
+ permissions:
15
+ contents: read
16
+ pages: write
17
+ id-token: write
18
+
19
+ concurrency:
20
+ group: ${{ github.workflow }}-${{ github.ref }}
21
+ cancel-in-progress: false
22
+
23
+ jobs:
24
+ build:
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - name: Checkout
28
+ uses: actions/checkout@v6
29
+
30
+ - name: Setup Ruby
31
+ uses: ruby/setup-ruby@v1
32
+ with:
33
+ ruby-version: '3.3'
34
+ bundler-cache: true
35
+ cache-version: 0
36
+ working-directory: docs
37
+
38
+ - name: Setup Pages
39
+ id: pages
40
+ uses: actions/configure-pages@v5
41
+
42
+ - name: Build with Jekyll
43
+ run: bundle exec jekyll build --verbose --trace --baseurl "${{ steps.pages.outputs.base_path }}"
44
+ working-directory: docs
45
+ env:
46
+ JEKYLL_ENV: production
47
+
48
+ - name: Upload artifact
49
+ uses: actions/upload-pages-artifact@v4
50
+ with:
51
+ path: docs/_site
52
+
53
+ deploy:
54
+ environment:
55
+ name: github-pages
56
+ url: ${{ steps.deployment.outputs.page_url }}
57
+ if: ${{ github.ref == 'refs/heads/main' }}
58
+ runs-on: ubuntu-latest
59
+ needs: build
60
+ steps:
61
+ - name: Deploy to GitHub Pages
62
+ id: deployment
63
+ uses: actions/deploy-pages@v4
@@ -1,13 +1,17 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
1
  name: release
4
2
 
3
+ permissions:
4
+ contents: write
5
+ packages: write
6
+ id-token: write
7
+
5
8
  on:
6
9
  workflow_dispatch:
7
10
  inputs:
8
11
  next_version:
9
12
  description: |
10
- Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
13
+ Next release version. Possible values: x.y.z, major, minor, patch (or pre|rc|etc).
14
+ Also, you can pass 'skip' to skip 'git tag' and do 'gem push' for the current version
11
15
  required: true
12
16
  default: 'skip'
13
17
  repository_dispatch:
@@ -21,3 +25,4 @@ jobs:
21
25
  secrets:
22
26
  rubygems-api-key: ${{ secrets.LUTAML_CI_RUBYGEMS_API_KEY }}
23
27
  pat_token: ${{ secrets.LUTAML_CI_PAT_TOKEN }}
28
+
data/.gitignore CHANGED
@@ -9,3 +9,14 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+
13
+ .rubocop-https*
14
+
15
+ # Artifacts from static site generators
16
+ /_site
17
+ /docs/_site
18
+ /docs/.jekyll-cache
19
+
20
+ # Gemfile locks (except bundled gems)
21
+ /Gemfile.lock
22
+ /docs/Gemfile.lock
data/.rubocop.yml CHANGED
@@ -1,10 +1,13 @@
1
- inherit_from: .rubocop_todo.yml
1
+ inherit_from:
2
+ - .rubocop_todo.yml
3
+
4
+ plugins:
5
+ - rubocop-performance
6
+ - rubocop-rake
7
+ - rubocop-rspec
2
8
 
3
9
  AllCops:
4
10
  TargetRubyVersion: 3.0
5
-
6
- Style/StringLiterals:
7
- EnforcedStyle: double_quotes
8
-
9
- Style/StringLiteralsInInterpolation:
10
- EnforcedStyle: double_quotes
11
+ NewCops: enable
12
+ Exclude:
13
+ - 'vendor/**/*'
data/.rubocop_todo.yml CHANGED
@@ -1,64 +1,270 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2025-06-13 04:55:12 UTC using RuboCop version 1.76.0.
3
+ # on 2026-04-03 21:59:29 UTC using RuboCop version 1.86.0.
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: 3
10
+ # This cop supports unsafe autocorrection (--autocorrect-all).
11
+ # Configuration parameters: RequireParenthesesForMethodChains.
12
+ Lint/AmbiguousRange:
13
+ Exclude:
14
+ - 'lib/rng/rnc_parser.rb'
15
+ - 'lib/rng/schema_validator.rb'
16
+
9
17
  # Offense count: 1
18
+ # Configuration parameters: AllowedMethods.
19
+ # AllowedMethods: enums
20
+ Lint/ConstantDefinitionInBlock:
21
+ Exclude:
22
+ - 'spec/rng/metanorma_conversion_spec.rb'
23
+
24
+ # Offense count: 5
25
+ # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
26
+ Lint/DuplicateBranch:
27
+ Exclude:
28
+ - 'lib/rng/rnc_to_rng_converter.rb'
29
+ - 'lib/rng/schema_validator.rb'
30
+
31
+ # Offense count: 3
32
+ Lint/DuplicateCaseCondition:
33
+ Exclude:
34
+ - 'lib/rng/external_ref_resolver.rb'
35
+ - 'lib/rng/schema_validator.rb'
36
+
37
+ # Offense count: 2
38
+ # Configuration parameters: AllowedParentClasses.
39
+ Lint/MissingSuper:
40
+ Exclude:
41
+ - 'lib/rng/foreign_attribute.rb'
42
+ - 'lib/rng/foreign_element.rb'
43
+
44
+ # Offense count: 4
45
+ Lint/NonLocalExitFromIterator:
46
+ Exclude:
47
+ - 'lib/rng/schema_validator.rb'
48
+
49
+ # Offense count: 3
10
50
  # This cop supports safe autocorrection (--autocorrect).
11
- Layout/EmptyLineAfterGuardClause:
51
+ Lint/UselessAssignment:
12
52
  Exclude:
13
53
  - 'spec/rng/spectest_spec.rb'
14
54
 
15
55
  # Offense count: 2
16
- # This cop supports safe autocorrection (--autocorrect).
17
- # Configuration parameters: AutoCorrect, AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
18
- # NotImplementedExceptions: NotImplementedError
19
- Lint/UnusedMethodArgument:
56
+ Lint/UselessConstantScoping:
20
57
  Exclude:
21
- - 'lib/rng.rb'
58
+ - 'lib/rng/parse_tree_processor.rb'
59
+ - 'lib/rng/rnc_to_rng_converter.rb'
22
60
 
23
- # Offense count: 7
61
+ # Offense count: 93
24
62
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
25
63
  Metrics/AbcSize:
26
- Max: 95
64
+ Max: 446
27
65
 
28
- # Offense count: 23
29
- # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
66
+ # Offense count: 28
67
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
30
68
  # AllowedMethods: refine
31
69
  Metrics/BlockLength:
32
- Max: 109
70
+ Max: 126
33
71
 
34
- # Offense count: 2
72
+ # Offense count: 6
73
+ # Configuration parameters: CountBlocks, CountModifierForms.
74
+ Metrics/BlockNesting:
75
+ Max: 6
76
+
77
+ # Offense count: 8
35
78
  # Configuration parameters: CountComments, CountAsOne.
36
79
  Metrics/ClassLength:
37
- Max: 167
80
+ Max: 1262
38
81
 
39
- # Offense count: 5
82
+ # Offense count: 104
40
83
  # Configuration parameters: AllowedMethods, AllowedPatterns.
41
84
  Metrics/CyclomaticComplexity:
42
- Max: 29
85
+ Max: 159
43
86
 
44
- # Offense count: 8
87
+ # Offense count: 118
45
88
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
46
89
  Metrics/MethodLength:
47
- Max: 86
90
+ Max: 266
48
91
 
49
- # Offense count: 4
92
+ # Offense count: 88
50
93
  # Configuration parameters: AllowedMethods, AllowedPatterns.
51
94
  Metrics/PerceivedComplexity:
52
- Max: 27
95
+ Max: 178
96
+
97
+ # Offense count: 4
98
+ # Configuration parameters: EnforcedStyle, AllowedPatterns, ForbiddenIdentifiers, ForbiddenPatterns.
99
+ # SupportedStyles: snake_case, camelCase
100
+ # ForbiddenIdentifiers: __id__, __send__
101
+ Naming/MethodName:
102
+ Exclude:
103
+ - 'lib/rng/schema_validator.rb'
104
+
105
+ # Offense count: 6
106
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
107
+ # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
108
+ Naming/MethodParameterName:
109
+ Exclude:
110
+ - 'lib/rng/rnc_parser.rb'
111
+ - 'lib/rng/schema_validator.rb'
112
+
113
+ # Offense count: 1
114
+ # Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
115
+ # AllowedMethods: call
116
+ # WaywardPredicates: infinite?, nonzero?
117
+ Naming/PredicateMethod:
118
+ Exclude:
119
+ - 'lib/rng/schema_validator.rb'
120
+
121
+ # Offense count: 3
122
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros, UseSorbetSigs.
123
+ # NamePrefix: is_, has_, have_, does_
124
+ # ForbiddenPrefixes: is_, has_, have_, does_
125
+ # AllowedMethods: is_a?
126
+ # MethodDefinitionMacros: define_method, define_singleton_method
127
+ Naming/PredicatePrefix:
128
+ Exclude:
129
+ - 'spec/**/*'
130
+ - 'lib/rng/rnc_to_rng_converter.rb'
131
+ - 'lib/rng/schema_validator.rb'
132
+ - 'lib/rng/test_suite_parser.rb'
133
+
134
+ # Offense count: 2
135
+ # Configuration parameters: EnforcedStyle, AllowedIdentifiers, AllowedPatterns, ForbiddenIdentifiers, ForbiddenPatterns.
136
+ # SupportedStyles: snake_case, camelCase
137
+ Naming/VariableName:
138
+ Exclude:
139
+ - 'lib/rng/schema_validator.rb'
140
+
141
+ # Offense count: 9
142
+ # Configuration parameters: MinSize.
143
+ Performance/CollectionLiteralInLoop:
144
+ Exclude:
145
+ - 'lib/rng/rnc_to_rng_converter.rb'
146
+ - 'lib/rng/schema_validator.rb'
147
+
148
+ # Offense count: 3
149
+ RSpec/BeforeAfterAll:
150
+ Exclude:
151
+ - '**/spec/spec_helper.rb'
152
+ - '**/spec/rails_helper.rb'
153
+ - '**/spec/support/**/*.rb'
154
+ - 'spec/rng/compacttest_spec.rb'
155
+
156
+ # Offense count: 3
157
+ # Configuration parameters: Prefixes, AllowedPatterns.
158
+ # Prefixes: when, with, without
159
+ RSpec/ContextWording:
160
+ Exclude:
161
+ - 'spec/rng/advanced_rnc_spec.rb'
162
+
163
+ # Offense count: 8
164
+ # Configuration parameters: IgnoredMetadata.
165
+ RSpec/DescribeClass:
166
+ Exclude:
167
+ - '**/spec/features/**/*'
168
+ - '**/spec/requests/**/*'
169
+ - '**/spec/routing/**/*'
170
+ - '**/spec/system/**/*'
171
+ - '**/spec/views/**/*'
172
+ - 'spec/rng/advanced_rnc_spec.rb'
173
+ - 'spec/rng/compacttest_spec.rb'
174
+ - 'spec/rng/metanorma_conversion_spec.rb'
175
+ - 'spec/rng/namespace_support_spec.rb'
176
+ - 'spec/rng/rnc_roundtrip_spec.rb'
177
+ - 'spec/rng/rng_generation_spec.rb'
178
+ - 'spec/rng/roundtrip_spec.rb'
179
+ - 'spec/rng/spectest_spec.rb'
180
+
181
+ # Offense count: 73
182
+ # Configuration parameters: CountAsOne.
183
+ RSpec/ExampleLength:
184
+ Max: 24
185
+
186
+ # Offense count: 10
187
+ # Configuration parameters: AssignmentOnly.
188
+ RSpec/InstanceVariable:
189
+ Exclude:
190
+ - 'spec/rng/compacttest_spec.rb'
191
+
192
+ # Offense count: 1
193
+ RSpec/LeakyConstantDeclaration:
194
+ Exclude:
195
+ - 'spec/rng/metanorma_conversion_spec.rb'
53
196
 
54
- # Offense count: 31
197
+ # Offense count: 4
198
+ RSpec/LeakyLocalVariable:
199
+ Exclude:
200
+ - 'spec/rng/rnc_parser_spec.rb'
201
+ - 'spec/rng/spectest_spec.rb'
202
+
203
+ # Offense count: 76
204
+ RSpec/MultipleExpectations:
205
+ Max: 9
206
+
207
+ # Offense count: 4
208
+ RSpec/RepeatedExample:
209
+ Exclude:
210
+ - 'spec/rng/schema_spec.rb'
211
+
212
+ # Offense count: 1
213
+ # Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector.
214
+ # SupportedInflectors: default, active_support
215
+ RSpec/SpecFilePathFormat:
216
+ Exclude:
217
+ - '**/spec/routing/**/*'
218
+ - 'spec/rng/schema_spec.rb'
219
+
220
+ # Offense count: 34
55
221
  # Configuration parameters: AllowedConstants.
56
222
  Style/Documentation:
57
223
  Enabled: false
58
224
 
225
+ # Offense count: 5
226
+ # Configuration parameters: MinBranchesCount.
227
+ Style/HashLikeCase:
228
+ Exclude:
229
+ - 'lib/rng/rnc_builder.rb'
230
+ - 'lib/rng/rnc_to_rng_converter.rb'
231
+
232
+ # Offense count: 2
233
+ # This cop supports unsafe autocorrection (--autocorrect-all).
234
+ Style/ReduceToHash:
235
+ Exclude:
236
+ - 'lib/rng/schema_preamble.rb'
237
+
238
+ # Offense count: 2
239
+ # This cop supports safe autocorrection (--autocorrect).
240
+ Style/RedundantParentheses:
241
+ Exclude:
242
+ - 'lib/rng/rnc_parser.rb'
243
+
59
244
  # Offense count: 1
245
+ # Configuration parameters: Max.
246
+ Style/SafeNavigationChainLength:
247
+ Exclude:
248
+ - 'spec/rng/rnc_parser_spec.rb'
249
+
250
+ # Offense count: 1
251
+ # This cop supports unsafe autocorrection (--autocorrect-all).
252
+ # Configuration parameters: Mode.
253
+ Style/StringConcatenation:
254
+ Exclude:
255
+ - 'lib/rng/rnc_builder.rb'
256
+
257
+ # Offense count: 2
258
+ # This cop supports safe autocorrection (--autocorrect).
259
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
260
+ # SupportedStyles: single_quotes, double_quotes
261
+ Style/StringLiterals:
262
+ Exclude:
263
+ - 'Gemfile'
264
+
265
+ # Offense count: 27
60
266
  # This cop supports safe autocorrection (--autocorrect).
61
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
267
+ # Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
62
268
  # URISchemes: http, https
63
269
  Layout/LineLength:
64
- Max: 261
270
+ Max: 168