You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If examples/validate.py can't find a schema referenced in one of the example files this only results in a warning and a zero exit code rather than a non-zero exit code that one could reasonably expect.
Motivation
A non-existent schema version referenced in an example file is likely to be a real error and should be treated as such. I can't come up with a use case where you'd have example files that reference non-existent schema versions.
Exemplification
Changing the event version of a randomly chosen example file to something bogus could easily be overlooked (especially if #265 is implemented and we start trusting the validation results):
$ python examples/validate.py
Loaded 105 schemas.
Loaded 94 examples.
WARNING: Missing schema for aaaaaaaa-bbbb-5ccc-8ddd-eeeeeeeeeee0(EiffelActivityCanceledEvent) in examples/events/EiffelActivityCanceledEvent/simple.json.
===SUMMARY===
Bad schema files: 0
Bad example files: 0
Successful validations: 93
Failed validations: 0
Unchecked examples: 1
=============
$ echo $?
0
Benefits
Reduced risk of mistakes when updating the example files.
Possible Drawbacks
None? Making missing schemas a non-error appears to be a conscious decision but I don't understand that rationale behind it. If there's a reasonable use case for the current behavior we could add a --strict flag or similar, or the reverse by making the default behavior fatal and adding a --ignore-missing-schema flag.
The text was updated successfully, but these errors were encountered:
Description
If examples/validate.py can't find a schema referenced in one of the example files this only results in a warning and a zero exit code rather than a non-zero exit code that one could reasonably expect.
Motivation
A non-existent schema version referenced in an example file is likely to be a real error and should be treated as such. I can't come up with a use case where you'd have example files that reference non-existent schema versions.
Exemplification
Changing the event version of a randomly chosen example file to something bogus could easily be overlooked (especially if #265 is implemented and we start trusting the validation results):
Benefits
Reduced risk of mistakes when updating the example files.
Possible Drawbacks
None? Making missing schemas a non-error appears to be a conscious decision but I don't understand that rationale behind it. If there's a reasonable use case for the current behavior we could add a
--strict
flag or similar, or the reverse by making the default behavior fatal and adding a--ignore-missing-schema
flag.The text was updated successfully, but these errors were encountered: