Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: check references to rules and articles #39

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Nanush7
Copy link
Member

@Nanush7 Nanush7 commented Jan 11, 2025

Added the ReferenceCheck visitor:

  • Flag rules referencing other non-existent/removed nodes.
  • Flag invalid references (e.g. regulations:guideline:..., guidelines:regulation:... or REgulations:...:...).

An example output with errors:

Couldn't compile file, the following occured:
 - Error: 2u2 has an invalid reference: 'guidelines:regulation:9a25'
 - Error: got reference 'reguLations:regulation:B4' in 5b4, but 'reguLations' must be all lowercase
 - Error: got reference 'regulations:artiCle:14' in 10e1, but 'artiCle' must be all lowercase
 - Error: A5b++ has an invalid reference: 'guidelines:regulation:5a'
 - Error: got reference 'regulations:reGulation:A1a4' in H1b1+, but 'reGulation' must be all lowercase
 - Error: Rule 9a25 is referenced in ['2u2'], but was not found
 - Error: Article 14 is referenced in ['10e1'], but was not found

@Nanush7 Nanush7 requested a review from gregorbg January 11, 2025 04:57
@Nanush7 Nanush7 self-assigned this Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant