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

lower case converter wrong validation #68

Open
toniop99 opened this issue Oct 29, 2022 · 3 comments
Open

lower case converter wrong validation #68

toniop99 opened this issue Oct 29, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@toniop99
Copy link

I think this is kind a bug but I am not sure if it could be the valid implementation of a lower case converter

Maybe is more related to jawira/case-converter than with that package.

Steps to reproduce

If we config the package to use "descriptionCase": "lower", if we try to commit the following commit type(scope): 1.1.1 to release a new version, the commit message validation will fail as it detect that the versioning is not in lower format

Screenshots or output

Image showing error

@toniop99 toniop99 added the bug Something isn't working label Oct 29, 2022
@toniop99
Copy link
Author

Definitely, I think that what I am commenting does not make sense, since there would be no way to differentiate the text from other types such as the dot conversion.

Sorry for the waste of time

@ramsey
Copy link
Owner

ramsey commented Oct 30, 2022

Your comment makes sense, and this has frustrated me, too. If you can think of a good way to validate the commit message like this, let me know. I'm willing to make that change.

@toniop99
Copy link
Author

I think we can try to validate if the description is for versioning and not apply descriptionCaseValidator and descriptionEndMarkValidator in that case. For that pupose, we can use the regex specified in the semserver website as official/recommended option.

Description validation

In addition, to generalize this behavior, the following options can be added to the configuration:

  • validateDescriptionWhenVersioningCommit -> if false description will not be validated.
  • customVersioningRegex -> Allow the user specify custom regex to decide if validation will be applied.

This is what comes to mind. Let me know what you think!

@toniop99 toniop99 reopened this Nov 5, 2022
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

2 participants