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

Check for unrecognised YAML keys #4

Open
Ortham opened this issue Jul 2, 2022 · 0 comments
Open

Check for unrecognised YAML keys #4

Ortham opened this issue Jul 2, 2022 · 0 comments

Comments

@Ortham
Copy link
Member

Ortham commented Jul 2, 2022

Unrecognised YAML keys are allowed at the top level of a metadata file, but below that the values of recognised keys should be the data structures defined for metadata files, and the presence of keys other than those defined for a data structure may indicate a typo. @sibir-ine has requested that the validator warn about such keys.

The YAML parsing isn't exposed to the metadata validator, and I don't think warnings would be useful in LOOT so doing the checks in libloot wouldn't be appropriate. We used to have a schema file that we validated masterlists against, and I think that validation warned about unrecognised keys, so it might be better to reintroduce that kind of validation as a separate step. Alternatively, the metadata validator could do a separate parse of the metadata file that checks for unrecognised keys, but this would involve pulling in yaml-cpp as a duplicate dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant