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.
- checksums.yaml +4 -4
- data/.github/workflows/docs.yml +63 -0
- data/.github/workflows/release.yml +8 -3
- data/.gitignore +11 -0
- data/.rubocop.yml +10 -7
- data/.rubocop_todo.yml +229 -23
- data/CHANGELOG.md +317 -0
- data/CLAUDE.md +139 -0
- data/Gemfile +11 -12
- data/README.adoc +1538 -11
- data/Rakefile +11 -3
- data/docs/Gemfile +8 -0
- data/docs/_config.yml +23 -0
- data/docs/getting-started/index.adoc +75 -0
- data/docs/guides/error-handling.adoc +137 -0
- data/docs/guides/external-references.adoc +128 -0
- data/docs/guides/index.adoc +24 -0
- data/docs/guides/parsing-rnc.adoc +141 -0
- data/docs/guides/parsing-rng-xml.adoc +81 -0
- data/docs/guides/rng-to-rnc.adoc +101 -0
- data/docs/guides/validation.adoc +85 -0
- data/docs/index.adoc +52 -0
- data/docs/reference/api.adoc +126 -0
- data/docs/reference/cli.adoc +182 -0
- data/docs/understanding/architecture.adoc +58 -0
- data/docs/understanding/rng-vs-rnc.adoc +118 -0
- data/exe/rng +5 -0
- data/lib/rng/any_name.rb +10 -8
- data/lib/rng/attribute.rb +28 -26
- data/lib/rng/choice.rb +24 -24
- data/lib/rng/cli.rb +607 -0
- data/lib/rng/data.rb +10 -10
- data/lib/rng/datatype_declaration.rb +26 -0
- data/lib/rng/define.rb +44 -41
- data/lib/rng/div.rb +36 -0
- data/lib/rng/documentation.rb +9 -0
- data/lib/rng/element.rb +39 -37
- data/lib/rng/empty.rb +7 -7
- data/lib/rng/except.rb +25 -25
- data/lib/rng/external_ref.rb +8 -8
- data/lib/rng/external_ref_resolver.rb +582 -0
- data/lib/rng/foreign_attribute.rb +26 -0
- data/lib/rng/foreign_element.rb +33 -0
- data/lib/rng/grammar.rb +14 -12
- data/lib/rng/group.rb +26 -24
- data/lib/rng/include.rb +5 -6
- data/lib/rng/include_processor.rb +461 -0
- data/lib/rng/interleave.rb +23 -23
- data/lib/rng/list.rb +22 -22
- data/lib/rng/mixed.rb +23 -23
- data/lib/rng/name.rb +7 -7
- data/lib/rng/namespace_declaration.rb +47 -0
- data/lib/rng/namespaces.rb +15 -0
- data/lib/rng/not_allowed.rb +7 -7
- data/lib/rng/ns_name.rb +9 -9
- data/lib/rng/one_or_more.rb +23 -23
- data/lib/rng/optional.rb +23 -23
- data/lib/rng/param.rb +8 -8
- data/lib/rng/parent_ref.rb +8 -8
- data/lib/rng/parse_tree_processor.rb +695 -0
- data/lib/rng/pattern.rb +7 -7
- data/lib/rng/ref.rb +8 -8
- data/lib/rng/rnc_builder.rb +927 -0
- data/lib/rng/rnc_parser.rb +605 -305
- data/lib/rng/rnc_to_rng_converter.rb +1408 -0
- data/lib/rng/schema_preamble.rb +73 -0
- data/lib/rng/schema_validator.rb +1622 -0
- data/lib/rng/start.rb +27 -25
- data/lib/rng/test_suite_parser.rb +168 -0
- data/lib/rng/text.rb +11 -8
- data/lib/rng/to_rnc.rb +4 -35
- data/lib/rng/value.rb +6 -7
- data/lib/rng/version.rb +1 -1
- data/lib/rng/zero_or_more.rb +23 -23
- data/lib/rng.rb +68 -17
- data/rng.gemspec +18 -19
- data/scripts/extract_spectest_resources.rb +96 -0
- data/spec/fixtures/compacttest.xml +2511 -0
- data/spec/fixtures/external/circular_a.rng +7 -0
- data/spec/fixtures/external/circular_b.rng +7 -0
- data/spec/fixtures/external/circular_main.rng +7 -0
- data/spec/fixtures/external/external_ref_lib.rng +7 -0
- data/spec/fixtures/external/external_ref_main.rng +7 -0
- data/spec/fixtures/external/include_lib.rng +7 -0
- data/spec/fixtures/external/include_main.rng +3 -0
- data/spec/fixtures/external/nested_chain.rng +6 -0
- data/spec/fixtures/external/nested_leaf.rng +7 -0
- data/spec/fixtures/external/nested_mid.rng +8 -0
- data/spec/fixtures/metanorma/3gpp.rnc +35 -0
- data/spec/fixtures/metanorma/3gpp.rng +105 -0
- data/spec/fixtures/metanorma/basicdoc.rnc +11 -0
- data/spec/fixtures/metanorma/bipm.rnc +148 -0
- data/spec/fixtures/metanorma/bipm.rng +376 -0
- data/spec/fixtures/metanorma/bsi.rnc +104 -0
- data/spec/fixtures/metanorma/bsi.rng +332 -0
- data/spec/fixtures/metanorma/csa.rnc +45 -0
- data/spec/fixtures/metanorma/csa.rng +131 -0
- data/spec/fixtures/metanorma/csd.rnc +43 -0
- data/spec/fixtures/metanorma/csd.rng +132 -0
- data/spec/fixtures/metanorma/gbstandard.rnc +99 -0
- data/spec/fixtures/metanorma/gbstandard.rng +316 -0
- data/spec/fixtures/metanorma/iec.rnc +49 -0
- data/spec/fixtures/metanorma/iec.rng +193 -0
- data/spec/fixtures/metanorma/ietf.rnc +275 -0
- data/spec/fixtures/metanorma/ietf.rng +925 -0
- data/spec/fixtures/metanorma/iho.rnc +58 -0
- data/spec/fixtures/metanorma/iho.rng +179 -0
- data/spec/fixtures/metanorma/isodoc.rnc +873 -0
- data/spec/fixtures/metanorma/isodoc.rng +2704 -0
- data/spec/fixtures/metanorma/isostandard-amd.rnc +43 -0
- data/spec/fixtures/metanorma/isostandard-amd.rng +108 -0
- data/spec/fixtures/metanorma/isostandard.rnc +166 -0
- data/spec/fixtures/metanorma/isostandard.rng +494 -0
- data/spec/fixtures/metanorma/itu.rnc +122 -0
- data/spec/fixtures/metanorma/itu.rng +377 -0
- data/spec/fixtures/metanorma/m3d.rnc +41 -0
- data/spec/fixtures/metanorma/m3d.rng +122 -0
- data/spec/fixtures/metanorma/mpfd.rnc +36 -0
- data/spec/fixtures/metanorma/mpfd.rng +95 -0
- data/spec/fixtures/metanorma/nist.rnc +77 -0
- data/spec/fixtures/metanorma/nist.rng +216 -0
- data/spec/fixtures/metanorma/ogc.rnc +51 -0
- data/spec/fixtures/metanorma/ogc.rng +151 -0
- data/spec/fixtures/metanorma/reqt.rnc +6 -0
- data/spec/fixtures/metanorma/rsd.rnc +36 -0
- data/spec/fixtures/metanorma/rsd.rng +95 -0
- data/spec/fixtures/metanorma/un.rnc +103 -0
- data/spec/fixtures/metanorma/un.rng +367 -0
- data/spec/fixtures/rnc/base.rnc +4 -0
- data/spec/fixtures/rnc/grammar_with_trailing.rnc +8 -0
- data/spec/fixtures/rnc/main_include_trailing.rnc +3 -0
- data/spec/fixtures/rnc/main_with_include.rnc +5 -0
- data/spec/fixtures/rnc/test_augment.rnc +10 -0
- data/spec/fixtures/rnc/test_isodoc_simple.rnc +9 -0
- data/spec/fixtures/rnc/top_level_include.rnc +8 -0
- data/spec/fixtures/spectest_external/case_10_4.7/x +3 -0
- data/spec/fixtures/spectest_external/case_10_4.7/y +7 -0
- data/spec/fixtures/spectest_external/case_11_4.7/x +3 -0
- data/spec/fixtures/spectest_external/case_12_4.7/x +3 -0
- data/spec/fixtures/spectest_external/case_13_4.7/x +3 -0
- data/spec/fixtures/spectest_external/case_13_4.7/y +3 -0
- data/spec/fixtures/spectest_external/case_14_4.7/x +7 -0
- data/spec/fixtures/spectest_external/case_15_4.7/x +7 -0
- data/spec/fixtures/spectest_external/case_16_4.7/x +5 -0
- data/spec/fixtures/spectest_external/case_17_4.7/x +5 -0
- data/spec/fixtures/spectest_external/case_18_4.7/x +7 -0
- data/spec/fixtures/spectest_external/case_19_4.7/level1.rng +9 -0
- data/spec/fixtures/spectest_external/case_19_4.7/level2.rng +7 -0
- data/spec/fixtures/spectest_external/case_1_4.5/sub1/x +3 -0
- data/spec/fixtures/spectest_external/case_1_4.5/sub3/x +3 -0
- data/spec/fixtures/spectest_external/case_1_4.5/x +3 -0
- data/spec/fixtures/spectest_external/case_20_4.6/x +3 -0
- data/spec/fixtures/spectest_external/case_2_4.5/x +3 -0
- data/spec/fixtures/spectest_external/case_3_4.6/x +3 -0
- data/spec/fixtures/spectest_external/case_4_4.6/x +3 -0
- data/spec/fixtures/spectest_external/case_5_4.6/x +1 -0
- data/spec/fixtures/spectest_external/case_6_4.6/x +5 -0
- data/spec/fixtures/spectest_external/case_7_4.6/x +1 -0
- data/spec/fixtures/spectest_external/case_7_4.6/y +1 -0
- data/spec/fixtures/spectest_external/case_8_4.7/x +7 -0
- data/spec/fixtures/spectest_external/case_9_4.7/x +7 -0
- data/spec/fixtures/spectest_external/resources.json +149 -0
- data/spec/rng/advanced_rnc_spec.rb +101 -0
- data/spec/rng/compacttest_spec.rb +197 -0
- data/spec/rng/datatype_declaration_spec.rb +28 -0
- data/spec/rng/div_spec.rb +207 -0
- data/spec/rng/external_ref_resolver_spec.rb +122 -0
- data/spec/rng/metanorma_conversion_spec.rb +159 -0
- data/spec/rng/namespace_declaration_spec.rb +60 -0
- data/spec/rng/namespace_support_spec.rb +199 -0
- data/spec/rng/rnc_parser_spec.rb +498 -22
- data/spec/rng/rnc_roundtrip_spec.rb +96 -82
- data/spec/rng/rng_generation_spec.rb +288 -0
- data/spec/rng/roundtrip_spec.rb +342 -0
- data/spec/rng/schema_preamble_spec.rb +145 -0
- data/spec/rng/schema_spec.rb +68 -64
- data/spec/rng/spectest_spec.rb +168 -90
- data/spec/rng_spec.rb +2 -2
- data/spec/spec_helper.rb +7 -42
- metadata +141 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 10c85f9f544d78d663a1f36cffdf7d3bca10fced07581fb5f6d52d63a548c895
|
|
4
|
+
data.tar.gz: 7fb492448f01443ede4f66af235787407bf44846a9d9ac0526fd6d1def565027
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
data/.rubocop.yml
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
inherit_from:
|
|
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
|
-
|
|
7
|
-
|
|
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
|
|
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
|
-
|
|
51
|
+
Lint/UselessAssignment:
|
|
12
52
|
Exclude:
|
|
13
53
|
- 'spec/rng/spectest_spec.rb'
|
|
14
54
|
|
|
15
55
|
# Offense count: 2
|
|
16
|
-
|
|
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:
|
|
61
|
+
# Offense count: 93
|
|
24
62
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
|
25
63
|
Metrics/AbcSize:
|
|
26
|
-
Max:
|
|
64
|
+
Max: 446
|
|
27
65
|
|
|
28
|
-
# Offense count:
|
|
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:
|
|
70
|
+
Max: 126
|
|
33
71
|
|
|
34
|
-
# Offense count:
|
|
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:
|
|
80
|
+
Max: 1262
|
|
38
81
|
|
|
39
|
-
# Offense count:
|
|
82
|
+
# Offense count: 104
|
|
40
83
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
41
84
|
Metrics/CyclomaticComplexity:
|
|
42
|
-
Max:
|
|
85
|
+
Max: 159
|
|
43
86
|
|
|
44
|
-
# Offense count:
|
|
87
|
+
# Offense count: 118
|
|
45
88
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
46
89
|
Metrics/MethodLength:
|
|
47
|
-
Max:
|
|
90
|
+
Max: 266
|
|
48
91
|
|
|
49
|
-
# Offense count:
|
|
92
|
+
# Offense count: 88
|
|
50
93
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
51
94
|
Metrics/PerceivedComplexity:
|
|
52
|
-
Max:
|
|
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:
|
|
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,
|
|
267
|
+
# Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
62
268
|
# URISchemes: http, https
|
|
63
269
|
Layout/LineLength:
|
|
64
|
-
Max:
|
|
270
|
+
Max: 168
|