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

1635 plug in validator tools #2206

Merged
merged 50 commits into from
Jun 8, 2023
Merged

Conversation

HannahJMWood
Copy link
Contributor

No description provided.

@HannahJMWood
Copy link
Contributor Author

There's a couple TODOs that might need discussion. I'm also happy to refactor the else if logic in the validateConfigPaths() function to a switch statement if people think that might make it more readable.

@HannahJMWood HannahJMWood marked this pull request as ready for review June 7, 2023 10:13
Copy link
Contributor

@BenSurgisonGDS BenSurgisonGDS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok so I'll approve, but I think we'll need to revisit the validator with a validator config solution to validate the plugins config.

keysToValidate.forEach(key => {
// Convert any strings to an array so that they can be processed
let criteriaConfig = pluginConfig[key]
if (typeof criteriaConfig === 'string') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to instead check that criteriaConfig is not an Array as it could be something other than a string.

Instead use if (!Array.isArray(criteriaConfig) {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@HannahJMWood HannahJMWood merged commit 59c3473 into main Jun 8, 2023
@HannahJMWood HannahJMWood deleted the 1635_plug-in_validator_tools branch June 8, 2023 15:48
@HannahJMWood HannahJMWood linked an issue Jun 9, 2023 that may be closed by this pull request
3 tasks
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

Successfully merging this pull request may close these issues.

Tools to help plug-in authors test their plug-ins
3 participants