chris48s / v8r

✔️ A command-line JSON, YAML and TOML validator that's on your wavelength
https://chris48s.github.io/v8r/
MIT License
29 stars 5 forks source link

consider moving plugin validation to `BasePlugin` constructor #504

Open chris48s opened 2 months ago

chris48s commented 2 months ago

At the moment, there's a stand-alone validatePlugin() method which is called on each plugin as v8r loads them. Would it make more sense to move that to BasePlugin.constructor() ? I think that would improve the process of developing plugins that live in their own repo as you can easily ensure your plugin passes validation checks in the plugin's test suite.

chris48s commented 2 weeks ago

A possible problem with this would be that plugins could override the validation, which would be bad.