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

Valid conventional commits treated as invalid #131

Closed
lersveen opened this issue Jul 1, 2024 · 3 comments · Fixed by #142
Closed

Valid conventional commits treated as invalid #131

lersveen opened this issue Jul 1, 2024 · 3 comments · Fixed by #142
Labels
bug Something isn't working released

Comments

@lersveen
Copy link
Contributor

lersveen commented Jul 1, 2024

Commit linting is configured to throw an error when commit subject has subject uses sentence-case, start-case, pascal-case or upper-case. It's nice to be consistent, but e.g. chore: Remove old host vmalxsift01 (sentence-case) should be perfectly valid.

The official conventional commits specification does not mention case of subject. Treating valid conventional commits as errors makes no sense.

Example of failing commit lint: https://github.com/nrkno/linuxadmin-saltstack/pull/2863#issuecomment-2196705327

I made a PR with suggested solution in Saltstack, but it's better implemented upstream in this workflow.

Also, see the in-depth discussion about this issue in the commitlint repo: conventional-changelog/commitlint#2141

@lersveen lersveen added the bug Something isn't working label Jul 1, 2024
@martinsolberg
Copy link
Contributor

The commit lint implementation is derived from the Angular contribution format. Personally I prefer it. It maintains visual consistency and grep-ability in the shell (without adding -i).

@lersveen
Copy link
Contributor Author

lersveen commented Jul 1, 2024

The commit lint implementation is derived from the Angular contribution format. Personally I prefer it. It maintains visual consistency and grep-ability in the shell (without adding -i).

It's not. The workflow default config uses the shared config @commitlint/config-conventional documented as a "shareable commitlint config enforcing conventional commits" and does not reference Angular. There is a separate shared config called @commitlint/config-angular.

The biggest issue right now is that there is no explicit documentation on any level of what actual behaviour to expect. Consistency is nice, but it seems counter-productive to enforce a default that is stricter than (and could be considered a faulty implementation of) the conventional commits specification.

Copy link
Contributor

🎉 This issue has been resolved in version 3.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
2 participants