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

feat(validation): Add support for properties files #52

Merged
merged 11 commits into from
Oct 5, 2023

Conversation

gokulav137
Copy link
Contributor

Adds support to validate properties files with .properties extension

uses: https://pkg.go.dev/github.com/magiconair/properties

resolves: #51

@kehoecj
Copy link
Collaborator

kehoecj commented Oct 5, 2023

Thanks for the PR and contribution! We'll take a look as soon as we can

@kehoecj kehoecj self-assigned this Oct 5, 2023
@kehoecj kehoecj added OSS Community Contribution Contributions from the OSS Community hacktoberfest 🎃 Hacktoberfest 2024 hacktoberfest-accepted Valid PR Hacktoberfest PR labels Oct 5, 2023
@kehoecj
Copy link
Collaborator

kehoecj commented Oct 5, 2023

Need to update this section of the README to include properties files

Copy link
Collaborator

@kehoecj kehoecj left a 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

pkg/validator/properties.go Show resolved Hide resolved
pkg/validator/properties.go Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
Copy link
Collaborator

@kehoecj kehoecj left a 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

pkg/reporter/stdout_reporter.go Show resolved Hide resolved
@kehoecj kehoecj merged commit db9e556 into Boeing:main Oct 5, 2023
3 checks passed
@kehoecj
Copy link
Collaborator

kehoecj commented Oct 5, 2023

Merged! Thank you for your contribution @gokulav137 💯

@gokulav137
Copy link
Contributor Author

Thanks for all the support @kehoecj

shiina4119 pushed a commit to shiina4119/config-file-validator that referenced this pull request Aug 23, 2024
* Add PropValidator which impliments Validator interface to prase byte array of properties

Signed-off-by: gokulav137 <[email protected]>

* Add valid and invalid scenarios for testing PropValidator

Signed-off-by: gokulav137 <[email protected]>

* Add PropFiletype to represent properties file and mapped it to PropValidator

Signed-off-by: gokulav137 <[email protected]>

* Add good and bad .properties files to test/fixtures

Signed-off-by: gokulav137 <[email protected]>

* Fix typo in test name: Properites -> Properties

Signed-off-by: gokulav137 <[email protected]>

* Add magiconair/properties to go.mod

Signed-off-by: gokulav137 <[email protected]>

* Add Properties to supported types in README

Signed-off-by: gokulav137 <[email protected]>

* Fix padding issue for multiline validation errors

Signed-off-by: gokulav137 <[email protected]>

* Add test case to cover multiline error padding case

Signed-off-by: gokulav137 <[email protected]>

* Add doc comment for padErrorString method

Signed-off-by: gokulav137 <[email protected]>

---------

Signed-off-by: gokulav137 <[email protected]>
shiina4119 pushed a commit to shiina4119/config-file-validator that referenced this pull request Oct 4, 2024
* Add PropValidator which impliments Validator interface to prase byte array of properties

Signed-off-by: gokulav137 <[email protected]>

* Add valid and invalid scenarios for testing PropValidator

Signed-off-by: gokulav137 <[email protected]>

* Add PropFiletype to represent properties file and mapped it to PropValidator

Signed-off-by: gokulav137 <[email protected]>

* Add good and bad .properties files to test/fixtures

Signed-off-by: gokulav137 <[email protected]>

* Fix typo in test name: Properites -> Properties

Signed-off-by: gokulav137 <[email protected]>

* Add magiconair/properties to go.mod

Signed-off-by: gokulav137 <[email protected]>

* Add Properties to supported types in README

Signed-off-by: gokulav137 <[email protected]>

* Fix padding issue for multiline validation errors

Signed-off-by: gokulav137 <[email protected]>

* Add test case to cover multiline error padding case

Signed-off-by: gokulav137 <[email protected]>

* Add doc comment for padErrorString method

Signed-off-by: gokulav137 <[email protected]>

---------

Signed-off-by: gokulav137 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest 🎃 Hacktoberfest 2024 hacktoberfest-accepted Valid PR Hacktoberfest PR OSS Community Contribution Contributions from the OSS Community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add syntax validation support for properties files
3 participants