-
Notifications
You must be signed in to change notification settings - Fork 310
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
Replace commitlint with a more generic and less fragile solution #6668
Comments
While I get the issues with commitlint, continue using it has some advantages:
My vote is to continue using commitlint. |
I'm not sure I can follow here. How's that related to commitlint specifically vs. any other conventional commits checker? |
Ok, if it's about CLI support, how about using https://github.com/cocogitto/cocogitto instead? That's at least written in Rust instead of TypeScript... 😉 Its accompanying https://github.com/cocogitto/cocogitto-bot also comments about failures instead of hiding the cause in logs. |
I'm open to alternatives, but they must be as easy to run locally as commitlint (e.g. |
I'm mostly talking about CLI tools, but the commitlint ecosystem also offers plugins for multiple editors: But more important for me is that a CLI tool exists that can use something like the
IIUC this would rely on regexes written in the CI definition files, which couldn't be easily reused by any local tools. |
Maybe https://github.com/nicolasfara/conventional-commits? |
The plugin does not seem to be very configurable. |
What other configuration beyond the available options would you expected from a tool that is specialized on conventional commits (not commit syntax in general)?
Once you configure around all the quirks in commitlint it somewhat works, yes. But my point is that there are too many quirks. IMO it's a badly written tool. So I'd like to keep the issue open for a while more. |
I would like the tool to verify not just the conventional commit types and scopes but also the whole commit syntax indeed. So line length, casing, and so on. Also, it seems the linked Gradle plugin does only work as a commit hook, I would not like that. |
Here's again a bogus error I'm running into. I'd really still like to get rid of commitlint. |
Issue references are part of the footer so it's complaining because there is no empty line before "Fixes #7366". The error message is not helpful though. |
What? No, why? Only my |
Ah, you might be confused by yet another bug which adds blank lines in the error output where there are none: conventional-changelog/commitlint#3129 |
Commitlint defaults to the conventional-commits-parser: https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/parse#api And this interprets issue references to be part of the footer: https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-commits-parser/README.md#usage The issue will go away if you add an empty line before "Fixes #7366" (like we usually format it anyway).
This bug makes it worse because the actual issue is not visible in the error output because of it.
I do agree with that, it seems to be overly complex for the problem it's trying to solve and the documentation is terrible.
If there was an alternative that fulfills the requirements mentioned in the messages above I would be happy to switch. |
Since the introduction of conventional commits and commitlint to enforce them we've faced various issues with commitlint, resulting in work-arounds like
ort/.commitlintrc.yml
Lines 5 to 11 in 2ce4322
Also the configuration syntax sucks quite frankly, like in
ort/.commitlintrc.yml
Lines 13 to 15 in 727fc5b
what the heck is "2" supposed to mean? Let alone the bugs.
As conventional commit can easily be checked via regexes, I propose to instead switch to a generic tool like https://github.com/GsActions/commit-message-checker that can also be configured to check for some of our other non-conventional-commits requirements.
Opinions, @oss-review-toolkit/core-devs?
Edit: Collecting ideas for alternatives
The text was updated successfully, but these errors were encountered: