-
Notifications
You must be signed in to change notification settings - Fork 72
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
feat(validation): Add support for properties files #52
Conversation
…array of properties Signed-off-by: gokulav137 <gokulav999@gmail.com>
Signed-off-by: gokulav137 <gokulav999@gmail.com>
…lidator Signed-off-by: gokulav137 <gokulav999@gmail.com>
Signed-off-by: gokulav137 <gokulav999@gmail.com>
Signed-off-by: gokulav137 <gokulav999@gmail.com>
Thanks for the PR and contribution! We'll take a look as soon as we can |
Need to update this section of the README to include properties files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! A few comments to address
Signed-off-by: gokulav137 <gokulav999@gmail.com>
Signed-off-by: gokulav137 <gokulav999@gmail.com>
Signed-off-by: gokulav137 <gokulav999@gmail.com>
Signed-off-by: gokulav137 <gokulav999@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last minor change requested
Signed-off-by: gokulav137 <gokulav999@gmail.com>
Merged! Thank you for your contribution @gokulav137 💯 |
Thanks for all the support @kehoecj |
* Add PropValidator which impliments Validator interface to prase byte array of properties Signed-off-by: gokulav137 <gokulav999@gmail.com> * Add valid and invalid scenarios for testing PropValidator Signed-off-by: gokulav137 <gokulav999@gmail.com> * Add PropFiletype to represent properties file and mapped it to PropValidator Signed-off-by: gokulav137 <gokulav999@gmail.com> * Add good and bad .properties files to test/fixtures Signed-off-by: gokulav137 <gokulav999@gmail.com> * Fix typo in test name: Properites -> Properties Signed-off-by: gokulav137 <gokulav999@gmail.com> * Add magiconair/properties to go.mod Signed-off-by: gokulav137 <gokulav999@gmail.com> * Add Properties to supported types in README Signed-off-by: gokulav137 <gokulav999@gmail.com> * Fix padding issue for multiline validation errors Signed-off-by: gokulav137 <gokulav999@gmail.com> * Add test case to cover multiline error padding case Signed-off-by: gokulav137 <gokulav999@gmail.com> * Add doc comment for padErrorString method Signed-off-by: gokulav137 <gokulav999@gmail.com> --------- Signed-off-by: gokulav137 <gokulav999@gmail.com>
* Add PropValidator which impliments Validator interface to prase byte array of properties Signed-off-by: gokulav137 <gokulav999@gmail.com> * Add valid and invalid scenarios for testing PropValidator Signed-off-by: gokulav137 <gokulav999@gmail.com> * Add PropFiletype to represent properties file and mapped it to PropValidator Signed-off-by: gokulav137 <gokulav999@gmail.com> * Add good and bad .properties files to test/fixtures Signed-off-by: gokulav137 <gokulav999@gmail.com> * Fix typo in test name: Properites -> Properties Signed-off-by: gokulav137 <gokulav999@gmail.com> * Add magiconair/properties to go.mod Signed-off-by: gokulav137 <gokulav999@gmail.com> * Add Properties to supported types in README Signed-off-by: gokulav137 <gokulav999@gmail.com> * Fix padding issue for multiline validation errors Signed-off-by: gokulav137 <gokulav999@gmail.com> * Add test case to cover multiline error padding case Signed-off-by: gokulav137 <gokulav999@gmail.com> * Add doc comment for padErrorString method Signed-off-by: gokulav137 <gokulav999@gmail.com> --------- Signed-off-by: gokulav137 <gokulav999@gmail.com>
Adds support to validate properties files with .properties extension
uses: https://pkg.go.dev/github.com/magiconair/properties
resolves: #51