-
Notifications
You must be signed in to change notification settings - Fork 919
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
Sentence-case is not work properly #3517
Comments
Isn't sentence case for the subject correct in this way? Subject is "Test Commit" and that's sentence case? |
Actually, my expectation from the sentence-case was that it only starts the first word of the sentence with a capital letter and forces all the letters of the remaining words to be lowercase. I think we understood the sentence-case differently. In my opinion, "Test Commit" should wrong and "Test commit" is true form of the sentence-case. I have seen similar situations in my research on the internet. If sentence-case works fine, what value should I use to make it do what I want? Thanks for your interest |
Got it! Thanks
I guess you got a point there 👍 Switching the label back to "bug" |
Wouldn't that ban the use of names in the commit title? Like, let's say, King Kong, or whatever. I wouldn't find this interpretation of sentence-case to be very useful, there would be false negatives all the time. |
True, good point. Looking at the current implementation it looks like it does what it's supposed to do. Maybe the docs should be more clear about this. I'm tempted to close this, what do you think @tugaydmrl . It will be hard to get this right. If the expectation is "correct English sentence" I doubt it's possible currently. |
I agree with you. Forcing only the first letter of the first word to be capitalized and the others to be lowercase also seems not appropriate for the sentence-case. For example, if New York is included in the sentence, this will also cause a problem. The approach to only capitalize the first letter of the first word is the best approach we have. We can close issue 👍 . Thanks for your feedbacks guys. |
So, is sentence-case Supposed To Be Like This? If so, I would rather rename it to title-case, to avoid further confusions. |
Deepdived into some history of this feature:
Not actually sure what to do with this now :P |
A refactor PR that changed behaviour? 😱 |
Well... "things" happen. Let's focus on the future here :P |
Expected Behavior
I have commitlint.config.js like this. According the rules, my subject sentence should start with capitalized word, other words should be all lowercase.
Current Behavior
But when i try to commit with message like "FEAT: Test Commit", it accepts. It should throw an error because this sentence is not compable with sentence-case.
Affected packages
Steps to Reproduce
commitlint --version
@commitlint/{cli,config-conventional}^17.4.2,
git --version
v2.30
node --version
v16.5.1
The text was updated successfully, but these errors were encountered: