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

description-max-length and description-empty rules trigger incorrectly #257

Closed
cengels opened this issue Feb 12, 2024 · 3 comments · Fixed by #267, #269 or #279
Closed

description-max-length and description-empty rules trigger incorrectly #257

cengels opened this issue Feb 12, 2024 · 3 comments · Fixed by #267, #269 or #279
Assignees
Labels
bug Something isn't working

Comments

@cengels
Copy link

cengels commented Feb 12, 2024

Describe the bug

Sorry for the many bug reports, but I hope this will help make commitlint-rs better!

  1. With a configuration file like the below,
  2. I tested a simple commit message like git commit -m "s"
  3. The validation fails with the following output:
description is empty or missing space in the beginning
description is longer than 72 characters
type is empty

If a type is supplied (like git commit -m "chore: s"), all 3 errors go away.

Config

rules:
  body-empty:
    level: ignore
  description-empty:
    level: error
  description-max-length:
    level: error
    length: 72
  type-empty:
    level: error

Error message

N/A

Expected behavior

Only the message type is empty should be printed here, as there is a non-empty description and it is not longer than the description-max-length.

Version

# Run the following command
$ commitlint --version
commitlint-rs 0.1.6

Additional context

N/A

@cengels cengels added the bug Something isn't working label Feb 12, 2024
@KeisukeYamashita
Copy link
Owner

Thanks for your report, I'll check it soon 🙏

@cengels
Copy link
Author

cengels commented Feb 16, 2024

@KeisukeYamashita I tested this in 0.1.8 and the original problem doesn't appear anymore, but now it seems the description-empty rule can't be triggered anymore at all? If I type echo "" | commitlint with description-empty.level: error, the validation passes without errors.

@KeisukeYamashita
Copy link
Owner

@cengels Opps, it might be a bug, let me check it later!
Thank you for your report!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment