rng 0.1.1 → 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 (192) 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 +11 -6
  6. data/.rubocop_todo.yml +270 -0
  7. data/CHANGELOG.md +317 -0
  8. data/CLAUDE.md +139 -0
  9. data/CODE_OF_CONDUCT.md +132 -0
  10. data/Gemfile +11 -10
  11. data/README.adoc +1929 -0
  12. data/Rakefile +11 -3
  13. data/docs/Gemfile +8 -0
  14. data/docs/_config.yml +23 -0
  15. data/docs/getting-started/index.adoc +75 -0
  16. data/docs/guides/error-handling.adoc +137 -0
  17. data/docs/guides/external-references.adoc +128 -0
  18. data/docs/guides/index.adoc +24 -0
  19. data/docs/guides/parsing-rnc.adoc +141 -0
  20. data/docs/guides/parsing-rng-xml.adoc +81 -0
  21. data/docs/guides/rng-to-rnc.adoc +101 -0
  22. data/docs/guides/validation.adoc +85 -0
  23. data/docs/index.adoc +52 -0
  24. data/docs/reference/api.adoc +126 -0
  25. data/docs/reference/cli.adoc +182 -0
  26. data/docs/understanding/architecture.adoc +58 -0
  27. data/docs/understanding/rng-vs-rnc.adoc +118 -0
  28. data/exe/rng +5 -0
  29. data/lib/rng/any_name.rb +28 -0
  30. data/lib/rng/attribute.rb +61 -5
  31. data/lib/rng/choice.rb +60 -0
  32. data/lib/rng/cli.rb +607 -0
  33. data/lib/rng/data.rb +32 -0
  34. data/lib/rng/datatype_declaration.rb +26 -0
  35. data/lib/rng/define.rb +56 -5
  36. data/lib/rng/div.rb +36 -0
  37. data/lib/rng/documentation.rb +9 -0
  38. data/lib/rng/element.rb +66 -18
  39. data/lib/rng/empty.rb +23 -0
  40. data/lib/rng/except.rb +62 -0
  41. data/lib/rng/external_ref.rb +28 -0
  42. data/lib/rng/external_ref_resolver.rb +582 -0
  43. data/lib/rng/foreign_attribute.rb +26 -0
  44. data/lib/rng/foreign_element.rb +33 -0
  45. data/lib/rng/grammar.rb +38 -0
  46. data/lib/rng/group.rb +62 -0
  47. data/lib/rng/include.rb +23 -0
  48. data/lib/rng/include_processor.rb +461 -0
  49. data/lib/rng/interleave.rb +58 -0
  50. data/lib/rng/list.rb +56 -0
  51. data/lib/rng/mixed.rb +58 -0
  52. data/lib/rng/name.rb +28 -0
  53. data/lib/rng/namespace_declaration.rb +47 -0
  54. data/lib/rng/namespaces.rb +15 -0
  55. data/lib/rng/not_allowed.rb +23 -0
  56. data/lib/rng/ns_name.rb +31 -0
  57. data/lib/rng/one_or_more.rb +58 -0
  58. data/lib/rng/optional.rb +58 -0
  59. data/lib/rng/param.rb +30 -0
  60. data/lib/rng/parent_ref.rb +28 -0
  61. data/lib/rng/parse_rnc.rb +26 -0
  62. data/lib/rng/parse_tree_processor.rb +695 -0
  63. data/lib/rng/pattern.rb +24 -0
  64. data/lib/rng/ref.rb +28 -0
  65. data/lib/rng/rnc_builder.rb +927 -0
  66. data/lib/rng/rnc_parser.rb +672 -115
  67. data/lib/rng/rnc_to_rng_converter.rb +1408 -0
  68. data/lib/rng/schema_preamble.rb +73 -0
  69. data/lib/rng/schema_validator.rb +1622 -0
  70. data/lib/rng/start.rb +57 -6
  71. data/lib/rng/test_suite_parser.rb +168 -0
  72. data/lib/rng/text.rb +29 -0
  73. data/lib/rng/to_rnc.rb +24 -0
  74. data/lib/rng/value.rb +28 -0
  75. data/lib/rng/version.rb +1 -1
  76. data/lib/rng/zero_or_more.rb +58 -0
  77. data/lib/rng.rb +80 -5
  78. data/rng.gemspec +19 -19
  79. data/scripts/extract_spectest_resources.rb +96 -0
  80. data/spec/fixtures/compacttest.xml +2511 -0
  81. data/spec/fixtures/external/circular_a.rng +7 -0
  82. data/spec/fixtures/external/circular_b.rng +7 -0
  83. data/spec/fixtures/external/circular_main.rng +7 -0
  84. data/spec/fixtures/external/external_ref_lib.rng +7 -0
  85. data/spec/fixtures/external/external_ref_main.rng +7 -0
  86. data/spec/fixtures/external/include_lib.rng +7 -0
  87. data/spec/fixtures/external/include_main.rng +3 -0
  88. data/spec/fixtures/external/nested_chain.rng +6 -0
  89. data/spec/fixtures/external/nested_leaf.rng +7 -0
  90. data/spec/fixtures/external/nested_mid.rng +8 -0
  91. data/spec/fixtures/metanorma/3gpp.rnc +35 -0
  92. data/spec/fixtures/metanorma/3gpp.rng +105 -0
  93. data/spec/fixtures/metanorma/basicdoc.rnc +11 -0
  94. data/spec/fixtures/metanorma/bipm.rnc +148 -0
  95. data/spec/fixtures/metanorma/bipm.rng +376 -0
  96. data/spec/fixtures/metanorma/bsi.rnc +104 -0
  97. data/spec/fixtures/metanorma/bsi.rng +332 -0
  98. data/spec/fixtures/metanorma/csa.rnc +45 -0
  99. data/spec/fixtures/metanorma/csa.rng +131 -0
  100. data/spec/fixtures/metanorma/csd.rnc +43 -0
  101. data/spec/fixtures/metanorma/csd.rng +132 -0
  102. data/spec/fixtures/metanorma/gbstandard.rnc +99 -0
  103. data/spec/fixtures/metanorma/gbstandard.rng +316 -0
  104. data/spec/fixtures/metanorma/iec.rnc +49 -0
  105. data/spec/fixtures/metanorma/iec.rng +193 -0
  106. data/spec/fixtures/metanorma/ietf.rnc +275 -0
  107. data/spec/fixtures/metanorma/ietf.rng +925 -0
  108. data/spec/fixtures/metanorma/iho.rnc +58 -0
  109. data/spec/fixtures/metanorma/iho.rng +179 -0
  110. data/spec/fixtures/metanorma/isodoc.rnc +873 -0
  111. data/spec/fixtures/metanorma/isodoc.rng +2704 -0
  112. data/spec/fixtures/metanorma/isostandard-amd.rnc +43 -0
  113. data/spec/fixtures/metanorma/isostandard-amd.rng +108 -0
  114. data/spec/fixtures/metanorma/isostandard.rnc +166 -0
  115. data/spec/fixtures/metanorma/isostandard.rng +494 -0
  116. data/spec/fixtures/metanorma/itu.rnc +122 -0
  117. data/spec/fixtures/metanorma/itu.rng +377 -0
  118. data/spec/fixtures/metanorma/m3d.rnc +41 -0
  119. data/spec/fixtures/metanorma/m3d.rng +122 -0
  120. data/spec/fixtures/metanorma/mpfd.rnc +36 -0
  121. data/spec/fixtures/metanorma/mpfd.rng +95 -0
  122. data/spec/fixtures/metanorma/nist.rnc +77 -0
  123. data/spec/fixtures/metanorma/nist.rng +216 -0
  124. data/spec/fixtures/metanorma/ogc.rnc +51 -0
  125. data/spec/fixtures/metanorma/ogc.rng +151 -0
  126. data/spec/fixtures/metanorma/reqt.rnc +6 -0
  127. data/spec/fixtures/metanorma/rsd.rnc +36 -0
  128. data/spec/fixtures/metanorma/rsd.rng +95 -0
  129. data/spec/fixtures/metanorma/un.rnc +103 -0
  130. data/spec/fixtures/metanorma/un.rng +367 -0
  131. data/spec/fixtures/rnc/address_book.rnc +10 -0
  132. data/spec/fixtures/rnc/base.rnc +4 -0
  133. data/spec/fixtures/rnc/complex_example.rnc +61 -0
  134. data/spec/fixtures/rnc/grammar_with_trailing.rnc +8 -0
  135. data/spec/fixtures/rnc/main_include_trailing.rnc +3 -0
  136. data/spec/fixtures/rnc/main_with_include.rnc +5 -0
  137. data/spec/fixtures/rnc/test_augment.rnc +10 -0
  138. data/spec/fixtures/rnc/test_isodoc_simple.rnc +9 -0
  139. data/spec/fixtures/rnc/top_level_include.rnc +8 -0
  140. data/spec/fixtures/rng/address_book.rng +20 -0
  141. data/spec/fixtures/rng/relaxng.rng +335 -0
  142. data/spec/fixtures/rng/testSuite.rng +163 -0
  143. data/spec/fixtures/spectest.xml +6845 -0
  144. data/spec/fixtures/spectest_external/case_10_4.7/x +3 -0
  145. data/spec/fixtures/spectest_external/case_10_4.7/y +7 -0
  146. data/spec/fixtures/spectest_external/case_11_4.7/x +3 -0
  147. data/spec/fixtures/spectest_external/case_12_4.7/x +3 -0
  148. data/spec/fixtures/spectest_external/case_13_4.7/x +3 -0
  149. data/spec/fixtures/spectest_external/case_13_4.7/y +3 -0
  150. data/spec/fixtures/spectest_external/case_14_4.7/x +7 -0
  151. data/spec/fixtures/spectest_external/case_15_4.7/x +7 -0
  152. data/spec/fixtures/spectest_external/case_16_4.7/x +5 -0
  153. data/spec/fixtures/spectest_external/case_17_4.7/x +5 -0
  154. data/spec/fixtures/spectest_external/case_18_4.7/x +7 -0
  155. data/spec/fixtures/spectest_external/case_19_4.7/level1.rng +9 -0
  156. data/spec/fixtures/spectest_external/case_19_4.7/level2.rng +7 -0
  157. data/spec/fixtures/spectest_external/case_1_4.5/sub1/x +3 -0
  158. data/spec/fixtures/spectest_external/case_1_4.5/sub3/x +3 -0
  159. data/spec/fixtures/spectest_external/case_1_4.5/x +3 -0
  160. data/spec/fixtures/spectest_external/case_20_4.6/x +3 -0
  161. data/spec/fixtures/spectest_external/case_2_4.5/x +3 -0
  162. data/spec/fixtures/spectest_external/case_3_4.6/x +3 -0
  163. data/spec/fixtures/spectest_external/case_4_4.6/x +3 -0
  164. data/spec/fixtures/spectest_external/case_5_4.6/x +1 -0
  165. data/spec/fixtures/spectest_external/case_6_4.6/x +5 -0
  166. data/spec/fixtures/spectest_external/case_7_4.6/x +1 -0
  167. data/spec/fixtures/spectest_external/case_7_4.6/y +1 -0
  168. data/spec/fixtures/spectest_external/case_8_4.7/x +7 -0
  169. data/spec/fixtures/spectest_external/case_9_4.7/x +7 -0
  170. data/spec/fixtures/spectest_external/resources.json +149 -0
  171. data/spec/rng/advanced_rnc_spec.rb +101 -0
  172. data/spec/rng/compacttest_spec.rb +197 -0
  173. data/spec/rng/datatype_declaration_spec.rb +28 -0
  174. data/spec/rng/div_spec.rb +207 -0
  175. data/spec/rng/external_ref_resolver_spec.rb +122 -0
  176. data/spec/rng/metanorma_conversion_spec.rb +159 -0
  177. data/spec/rng/namespace_declaration_spec.rb +60 -0
  178. data/spec/rng/namespace_support_spec.rb +199 -0
  179. data/spec/rng/rnc_parser_spec.rb +501 -23
  180. data/spec/rng/rnc_roundtrip_spec.rb +135 -0
  181. data/spec/rng/rng_generation_spec.rb +288 -0
  182. data/spec/rng/roundtrip_spec.rb +342 -0
  183. data/spec/rng/schema_preamble_spec.rb +145 -0
  184. data/spec/rng/schema_spec.rb +125 -172
  185. data/spec/rng/spectest_spec.rb +273 -0
  186. data/spec/rng_spec.rb +2 -2
  187. data/spec/spec_helper.rb +7 -9
  188. metadata +188 -8
  189. data/lib/rng/builder.rb +0 -158
  190. data/lib/rng/rng_parser.rb +0 -107
  191. data/lib/rng/schema.rb +0 -18
  192. data/spec/rng/rng_parser_spec.rb +0 -102
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b70e1b28d17dd9d6a287a404f218151f5a25ab38eba65aba55330d1e5692a08
4
- data.tar.gz: d8524a2367eb0c73b64f9040555a2269ad2e6f8121a5ed5d05021c20ad00042b
3
+ metadata.gz: 10c85f9f544d78d663a1f36cffdf7d3bca10fced07581fb5f6d52d63a548c895
4
+ data.tar.gz: 7fb492448f01443ede4f66af235787407bf44846a9d9ac0526fd6d1def565027
5
5
  SHA512:
6
- metadata.gz: 06bc5ef5f3d56f356730e71b42ee2080ab449ed1c769446a315a8077a015327bea94635e172ab9dcbd1d2559eacbb21ad519f3c5dc48fc45c5c7c7ee577326e2
7
- data.tar.gz: 2eca01084c177a824f02c5f30c03fc2463de4fee55fab370c9fc951bc51cbf56fadebee4f326c1472754f394361a4e932979d269bf130b1a23312af20feb6483
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,8 +1,13 @@
1
- AllCops:
2
- TargetRubyVersion: 3.0
1
+ inherit_from:
2
+ - .rubocop_todo.yml
3
3
 
4
- Style/StringLiterals:
5
- EnforcedStyle: double_quotes
4
+ plugins:
5
+ - rubocop-performance
6
+ - rubocop-rake
7
+ - rubocop-rspec
6
8
 
7
- Style/StringLiteralsInInterpolation:
8
- EnforcedStyle: double_quotes
9
+ AllCops:
10
+ TargetRubyVersion: 3.0
11
+ NewCops: enable
12
+ Exclude:
13
+ - 'vendor/**/*'
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,270 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2026-04-03 21:59:29 UTC using RuboCop version 1.86.0.
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: 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
+
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
50
+ # This cop supports safe autocorrection (--autocorrect).
51
+ Lint/UselessAssignment:
52
+ Exclude:
53
+ - 'spec/rng/spectest_spec.rb'
54
+
55
+ # Offense count: 2
56
+ Lint/UselessConstantScoping:
57
+ Exclude:
58
+ - 'lib/rng/parse_tree_processor.rb'
59
+ - 'lib/rng/rnc_to_rng_converter.rb'
60
+
61
+ # Offense count: 93
62
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
63
+ Metrics/AbcSize:
64
+ Max: 446
65
+
66
+ # Offense count: 28
67
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
68
+ # AllowedMethods: refine
69
+ Metrics/BlockLength:
70
+ Max: 126
71
+
72
+ # Offense count: 6
73
+ # Configuration parameters: CountBlocks, CountModifierForms.
74
+ Metrics/BlockNesting:
75
+ Max: 6
76
+
77
+ # Offense count: 8
78
+ # Configuration parameters: CountComments, CountAsOne.
79
+ Metrics/ClassLength:
80
+ Max: 1262
81
+
82
+ # Offense count: 104
83
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
84
+ Metrics/CyclomaticComplexity:
85
+ Max: 159
86
+
87
+ # Offense count: 118
88
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
89
+ Metrics/MethodLength:
90
+ Max: 266
91
+
92
+ # Offense count: 88
93
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
94
+ Metrics/PerceivedComplexity:
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'
196
+
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
221
+ # Configuration parameters: AllowedConstants.
222
+ Style/Documentation:
223
+ Enabled: false
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
+
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
266
+ # This cop supports safe autocorrection (--autocorrect).
267
+ # Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
268
+ # URISchemes: http, https
269
+ Layout/LineLength:
270
+ Max: 168