Skip to content

cz check fails #444

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

Closed
manang opened this issue Oct 6, 2021 · 10 comments
Closed

cz check fails #444

manang opened this issue Oct 6, 2021 · 10 comments

Comments

@manang
Copy link
Contributor

manang commented Oct 6, 2021

Description

cz check fails if the scope contains a space, but it is possible to commit with a space among the words.

Steps to reproduce

cz commit
->write a scope of two words with a space between
cz check --rev-range origin/master..

Current behavior

It fails, because the scope contains a space

Desired behavior

it does not show errors

Environment

Commitizen Version: 2.19.0
Python Version: 3.9.7 (default, Sep 3 2021, 12:37:55)
[Clang 12.0.5 (clang-1205.0.22.9)]
Operating System: Darwin (or ubuntu)

@manang manang changed the title Good bug title tells us about precise symptom, not about the root cause. cz check fails Oct 6, 2021
@Lee-W
Copy link
Member

Lee-W commented Oct 6, 2021

Do you mean commit like feat(test test): test? If so, I just confirmed it failed. I'm ok with space inside scope. conventional commit doesn't seem to have a clear definition on whether space should be removed. @woile What do you think?

@manang
Copy link
Contributor Author

manang commented Oct 6, 2021

Hi @Lee-W ,
yes, your example is correct.
I don't know if feat(test test) is compliant with conventional commit., but if I can commit with cz commit, so, cz check does not have to return that the commit is not compliant.
Only this.

Thanks for your help

@woile
Copy link
Member

woile commented Oct 6, 2021

somehow cz commit and cz check should match, I agree.

there's not much information about the scope. I'm not a big fan of spaces but there shouldn't be anything wrong with them, the changelog would look ok as well:

test config: changed parameter for foobar

I've seen ppl using a - to separate words.

@CarlosBrunoE
Copy link

Hello
I have kind of problem like that....
when I try to add the scope this happens:

commit validation: failed!
please enter a commit message in the commitizen format.
commit "": "test(scope): te5st y mas test"
pattern: (build|ci|docs|feat|fix|perf|refactor|test):(\s.*)

When I don't use the scope the check works well.

This is my schema pattern config:

**schema_pattern: "(build|ci|docs|feat|fix|perf|refactor|test):(\\s.*)"**

The scope supposed to be optional, isn't ?

@CarlosBrunoE
Copy link

The problem was tat was missing (.*) after the first value:

Example:
schema_pattern: "(build|ci|docs|feat|fix|perf|refactor|test)(.):(\s.)"

@manang
Try upgrading to latest version. It worked for me

@manang
Copy link
Contributor Author

manang commented Oct 7, 2021

which version? on brew there is a version less recent. thanks

@CarlosBrunoE
Copy link

v2.20.0
was released yesterday

@manang
Copy link
Contributor Author

manang commented Oct 7, 2021 via email

@Lee-W
Copy link
Member

Lee-W commented Oct 9, 2021

I've sent a PR to address homebrew publishing issue #445 Let's see whether this issue will be fixed.

@woile
Copy link
Member

woile commented Apr 28, 2023

Closing as commitizen is being released on brew and apparently this issue was solved.

Feel free to reopen if it still happens

@woile woile closed this as completed Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants