-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
[BUG] Fails to parse commits with whitespace in scope #4
Comments
This is intentional, as far as I understand the spec, space are not allowed in scope.
I might be wrong though but my understanding is that a scope must be a single noun. |
Well yeah, it reads like that... As a reference I guess A user needs this feature in orhun/git-cliff#1008 so how do you want to proceed here? 👀 Would it be possible to implement it or do you want to adhere to the spec? |
Hey again @orhun, I definitely prefer the crate to be strict with the spec, I would accept a PR if this is behind a feature flag though. |
I would be interested in contributing this feature - what would be the feature flag called? P.S. inviting @marcoieni (maintainer of |
|
Another alternative would be to add a function allowing post parsing validation via some predicates, this would not require a feature flag though. Also this would allow to support many user specific validations such as cocogitto/cocogitto#434 |
Sure, that sounds like a more flexible solution. I'm not sure how that would look like in the API side though. Do you mean adding a e.g. In the meantime I looked into supporting this with a feature flag and it seems like it can be configured on the pest-level: commit_type = { ASCII_ALPHA+ }
scope = { (parent_left ~ scope_content ~ parent_right) }
breaking_change_mark = { "!"? }
-scope_content = ${ ( no_whitespace ~ no_parenthesis ~ !NEWLINE ~ ANY)+ }
+scope_content = ${ ( no_parenthesis ~ !NEWLINE ~ ANY)+ } Is there any other way to make it configurable? |
Describe the bug
The parser fails to parse commits such as:
To Reproduce
See #5
Expected behavior
Successful parse.
Additional context
Originally reported at release-plz/release-plz#1996
The text was updated successfully, but these errors were encountered: