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

Validation framework #17

Open
ftomassetti opened this issue Jan 28, 2025 · 0 comments
Open

Validation framework #17

ftomassetti opened this issue Jan 28, 2025 · 0 comments

Comments

@ftomassetti
Copy link
Member

Currently to validate the AST we write rules that needs to traverse the entire tree. If we write 20 rules, we traverse the tree 20 times. We could instead create a mechanism to register validators for different node types, traverse the tree once, and on each node invoke the validators. The validators would consist of a predicate and an issue generator. If the predicate is satisfied the issue generator is invoked and the issue added to the list.

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