Title: feat: add config option for line length warning by Lee-W · Pull Request #1590 · commitizen-tools/commitizen · GitHub
Open Graph Title: feat: add config option for line length warning by Lee-W · Pull Request #1590 · commitizen-tools/commitizen
X Title: feat: add config option for line length warning by Lee-W · Pull Request #1590 · commitizen-tools/commitizen
Description: 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 I have read the contributing guidelines Code Changes Add test cases to all the changes you introduce Run poetry all locally to ensure this change passes linter check and tests Manually test the changes: Verify the feature/bug fix works as expected in real-world scenarios Test edge cases and error conditions Ensure backward compatibility is maintained Document any manual testing steps performed Update the documentation for the changes Documentation Changes Run poetry doc locally to ensure the documentation pages renders correctly Check and fix any broken links (internal or external) in the documentation Expected Behavior Users can now set default commit message length limits in their configuration file: [tool.commitizen] message_length_limit = 72 Steps to Test This Pull Request Test Configuration File Support # Add the following to your pyproject.toml: [tool.commitizen] message_length_limit = 30 # Test with long message (should fail) cz check -m "fix: this is a very long commit message that exceeds 30 characters" # Test with short message (should pass) cz check -m "fix: short message" Test CLI Override # CLI argument should override config setting cz check -m "fix: this message is longer than 30 chars but shorter than 60" -l 60 # Disable limit with CLI cz check -m "fix: very long message that would normally fail config limit" -l 0 Additional Context
Open Graph Description: 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-lin...
X Description: 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-lin...
Opengraph URL: https://github.com/commitizen-tools/commitizen/pull/1590
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:e36f2887-346f-a5f1-22d3-bff0cb0388d7 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8EE0:E9E68:F6B6CF:14C424A:6A4F09CB |
| html-safe-nonce | 5b36f8cbdb26c35f32c7b6a2052df2af5441e20ef008f2d90ec196dfe97ea111 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RUUwOkU5RTY4OkY2QjZDRjoxNEM0MjRBOjZBNEYwOUNCIiwidmlzaXRvcl9pZCI6IjUzNzkwNjU1NTkyNDQ1NDAzNjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ae79a8d68f0508aa572c4c53c1c1cf38b6103688e301f866e7660554324a1486 |
| hovercard-subject-tag | pull_request:2810579512 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/commitizen-tools/commitizen/pull/1590/files |
| twitter:image | https://avatars.githubusercontent.com/u/5144808?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/5144808?s=400&v=4 |
| og:image:alt | 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-lin... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/commitizen-tools/commitizen git https://github.com/commitizen-tools/commitizen.git |
| octolytics-dimension-user_id | 62252524 |
| octolytics-dimension-user_login | commitizen-tools |
| octolytics-dimension-repository_id | 106127589 |
| octolytics-dimension-repository_nwo | commitizen-tools/commitizen |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 106127589 |
| octolytics-dimension-repository_network_root_nwo | commitizen-tools/commitizen |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b8f23afb982271f1b22258a94aede67a6b77760 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width