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

Validating Visitor should not break on name changes #2685

Open
marmegh opened this issue Jun 16, 2023 · 0 comments
Open

Validating Visitor should not break on name changes #2685

marmegh opened this issue Jun 16, 2023 · 0 comments

Comments

@marmegh
Copy link
Contributor

marmegh commented Jun 16, 2023

RuleId should be the source of truth for identifying a rule instead of RuleName, as only the RuleId should be guaranteed to not change. The ValidatingVisitor uses a RuleNameToValidationMethods mapping to lookup and subsequently validate/revalidate a given rule. If/when a RuleName is changed, revalidating of previous results breaks due to this name change and instead a NoMatch is returned. To support tool backwards compatibility, switching to a RuleIdToValidationMethods mapping would be a more stable implementation. I would highly recommend supporting both approaches in the ValidatingVisitor to prevent additional backward compatibility issues.

cc: @rwoll, @alisonmaclellan, @Jeremiah-Johnson, @AmyFeld

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant