KeisukeYamashita / commitlint-rs

🔦 Lint commit messages with conventional commit messages
https://keisukeyamashita.github.io/commitlint-rs
Apache License 2.0
32 stars 8 forks source link

`scopes are not allowed` error without scopes #278

Closed cengels closed 8 months ago

cengels commented 8 months ago

Describe the bug

Followup of #273. An input like echo "feat: something" | commitlint unexpectedly emits a scopes are not allowed error, even though a scope is not used in the commit message.

Config

rules:
  scope:
    level: error
    options: []
  scope-empty:
    level: ignore

Error message

scopes are not allowed

Expected behavior

No error.

Version

$ commitlint --version
commitlint-rs 0.1.8

Additional context

Trying the same with types.options: [] doesn't seem to work properly either, but let's be honest, permitting scopes but not types makes absolutely no sense at all, so I wouldn't really consider this a problem.

KeisukeYamashita commented 8 months ago

Thank you very much for your report! Now, it generates no error 🙏

echo "feat: something" | commitlint
=> None