-
-
Notifications
You must be signed in to change notification settings - Fork 301
feat: add config option for line length warning #1574
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
feat: add config option for line length warning #1574
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## master #1574 +/- ## ========================================== + Coverage 97.33% 98.25% +0.91% ========================================== Files 42 58 +16 Lines 2104 2695 +591 ========================================== + Hits 2048 2648 +600 + Misses 56 47 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Sorry, I accidentally closed this pull request.
let's rebase from v4-9-test
9a2622f
to
c300b70
Compare
I have rebased my branch onto v4-9-0.
I’m not very familiar with Git, so please let me know if I missed anything.
I have rebased my branch onto v4-9-0. I’m not very familiar with Git, so please let me know if I missed anything.
You've done it perfectly 🙂 I'll take a look when bandwidth allow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! A few suggestion:
commitizen/commands/check.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does ""
mean here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you forgot to put something like commit hash here in the error message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You’re right. I referenced the error handling for invalid messages and forgot to add the commit hash. I’ll make the correction.
commitizen/defaults.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we just use None
for no limit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially, I set it to 0 simply because I thought commit messages wouldn't have a 0-character scenario, but your suggestion of using None is more clear. I've made this change accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see why you used 0 for no limit. It is because you wanted to align with the original design.
I will probably be a breaking change if we change the default value of this option. wdyt @Lee-W ?
we might need to resolve the conflict first. Thanks!
69db5b4
to
b313847
Compare
c700d66
to
8b969db
Compare
Hi @Narwhal-fish , could you help to rebase your branch when you have a moment?
You can run
git fetch upstream
git rebase upstream master -i
and then drop all commits but yours.
db902f9
to
de2e785
Compare
de2e785
to
e70271b
Compare
Description
This PR implements configuration file support for the
message_length_limit
option, addressing issue #1571 . Previously, users could only set commit message length limits via command-line arguments (-l/--message-length-limit
). Now they can define a default limit in their configuration file.Checklist
Code Changes
poetry all
locally to ensure this change passes linter check and testsDocumentation Changes
poetry doc
locally to ensure the documentation pages renders correctlyExpected Behavior
Users can now set default commit message length limits in their configuration file:
Steps to Test This Pull Request
Additional Context