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

Unknown fields in the check section of .yaml should cause WARN log messages. #15

Open
dougb opened this issue Jun 27, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@dougb
Copy link
Collaborator

dougb commented Jun 27, 2019

While testing stringLengthCheck I accidently referenced minLength instead of minValue
This caused configTest() to fail for no apparent reason and took me a really long time to debug because the program was not logging any useful information. configTest() did generate a ValidatorError() event in the eventLog, but the program doesn't write the report.json or HTML report on configTest() failures.

The new Object.fromJson() constructors should log a warn for every unknown field present in the config.
In general, I do not think that unknown fields should be an error, only a warning, this helps keeps the config "compatible" across versions.
Maybe create a cli option for strict config parsing.

@dougb dougb added the bug Something isn't working label Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant