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

Add support for custom validators #35

Merged
merged 5 commits into from
May 10, 2022
Merged

Add support for custom validators #35

merged 5 commits into from
May 10, 2022

Conversation

davelopez
Copy link
Owner

This is the groundwork for #8 and #27

A WorkflowLanguageService can now get a list of ValidationContributors which contribute new diagnostics based on custom rules.
The MissingPropertyValidationRule is an example of this kind of ValidationContributor. i.e. we can then make the release property required by adding the rule like:

this.setValidationContributors([new MissingPropertyValidationRule("release", DiagnosticSeverity.Error)]);

The next step will be defining more custom rules (#8) and grouping them under Profiles so we can add a setting option to address #27

davelopez added 5 commits May 8, 2022 16:51
Implement the NativeWorkflowDocument based on JSONDocument.
Implementing a collection of `ValidationContributor`s and adding them to
the language service through `setValidationContributors` will allow
to define custom validation rules.
@davelopez davelopez added the enhancement New feature or request label May 8, 2022
@davelopez davelopez added this to the v0.2.0 milestone May 8, 2022
@davelopez davelopez merged commit cb0a9b1 into main May 10, 2022
@davelopez davelopez deleted the custom_validators branch May 10, 2022 20:56
@davelopez davelopez mentioned this pull request Jun 11, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant