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

chore: allow whitespace after comma in ignore validations comments #89

Merged
merged 11 commits into from
Oct 14, 2024

Conversation

jmichalek132
Copy link
Contributor

It's common practice to have whitespaces in comma separated lists, however since we don't remove them in the implementation of the comment / annotation for disabling validations, the whitespaces causes the the name of the validations to not match.
This draft PR provides a file for a test case and adds whitespace trimming for the validation name.

@jmichalek132 jmichalek132 marked this pull request as ready for review October 7, 2024 12:15
pkg/validate/validate.go Outdated Show resolved Hide resolved
Copy link
Owner

@FUSAKLA FUSAKLA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

This is definitely the intended behavior to strip trailing commas and white spaces so thank you for fixing this :)

I left just few notes about the implementation

pkg/validate/validate.go Show resolved Hide resolved
pkg/validate/validate.go Outdated Show resolved Hide resolved
Copy link
Owner

@FUSAKLA FUSAKLA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks! 👍

Sorry for the nitpicking

@FUSAKLA
Copy link
Owner

FUSAKLA commented Oct 7, 2024

The CI is failing, would you please try running make lint locally?

@jmichalek132
Copy link
Contributor Author

Great, thanks! 👍

Sorry for the nitpicking

No worries thanks for the feedback.

@jmichalek132
Copy link
Contributor Author

The CI is failing, would you please try running make lint locally?

Oh could you please run it, I am using WSL2 which golangci-lint seems to have some issues with xxpxxxxp/intellij-plugin-golangci-lint#71.

@FUSAKLA FUSAKLA merged commit 666b9c0 into FUSAKLA:master Oct 14, 2024
2 checks passed
@FUSAKLA
Copy link
Owner

FUSAKLA commented Oct 14, 2024

Thanks! 👍

@jmichalek132 jmichalek132 deleted the jm-chore-test-ignore-comments branch October 15, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants