René's URL Explorer Experiment


Title: Fix: message_length_limit config is ignored when CLI flag is unset (commit/check) · Issue #1899 · commitizen-tools/commitizen · GitHub

Open Graph Title: Fix: message_length_limit config is ignored when CLI flag is unset (commit/check) · Issue #1899 · commitizen-tools/commitizen

X Title: Fix: message_length_limit config is ignored when CLI flag is unset (commit/check) · Issue #1899 · commitizen-tools/commitizen

Description: Description When message_length_limit is configured (e.g., in pyproject.toml), cz commit / cz check should enforce it unless the user explicitly overrides it via the CLI -l/--message-length-limit. Currently, if the CLI argument exists bu...

Open Graph Description: Description When message_length_limit is configured (e.g., in pyproject.toml), cz commit / cz check should enforce it unless the user explicitly overrides it via the CLI -l/--message-length-limit. ...

X Description: Description When message_length_limit is configured (e.g., in pyproject.toml), cz commit / cz check should enforce it unless the user explicitly overrides it via the CLI -l/--message-length-limit. ...

Opengraph URL: https://github.com/commitizen-tools/commitizen/issues/1899

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fix: message_length_limit config is ignored when CLI flag is unset (commit/check)","articleBody":"### Description\n\nWhen `message_length_limit` is configured (e.g., in `pyproject.toml`), `cz commit / cz check` should enforce it unless the user explicitly overrides it via the CLI `-l/--message-length-limit`.\nCurrently, if the CLI argument exists but is `None/unset`, the code path ends up treating it as “no limit”, so the configured limit is not applied.\n\nReason why:\n1. `argparse` leaves `message_length_limit` as `None` when the flag isn’t provided (no default is set). eg. `cz commit`\n3. Because **the key still exists in arguments**, `arguments.get(\"message_length_limit\", ...)` returns `None` and never falls back to `config.settings`, effectively **bypassing the configured limit**.\n\n### Steps to reproduce\n\n1. Create a `pyproject.toml` with:\n```toml\n[tool.commitizen]\nname = \"cz_conventional_commits\"\nmessage_length_limit = 10\n```\n\n2. Run either:\n- `cz check --message \"feat: this is definitely too long\"`\n- or `cz commit --dry-run` and enter a subject that makes the first line longer than 10 characters.\n\n3. Ensure you did **not** pass -l/--message-length-limit.\n\n### Current behavior\n\nThe configured `message_length_limit` from `pyproject.toml` is **not enforced** when the CLI flag is unset, allowing too-long subjects to pass.\n\n### Desired behavior\n\n- Enforce `message_length_limit` from config when `-l/--message-length-limit` is not provided.\n- Precedence should be CLI \u003e config \u003e default (0 = no limit).\n- `-l 0` should explicitly disable the limit even if config sets one.\n\n### Screenshots\n\n\u003cimg width=\"922\" height=\"695\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/34f7643b-a782-4f44-9704-ba9bd610be34\" /\u003e\n\n### Environment\n\nCommitizen Version: 4.13.9\nPython Version: 3.14.3 (main, Feb  3 2026, 15:32:20) [Clang 15.0.0 (clang-1500.1.0.2.5)]\nOperating System: Darwin","author":{"url":"https://github.com/ttw225","@type":"Person","name":"ttw225"},"datePublished":"2026-03-18T08:49:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1899/commitizen/issues/1899"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a733d920-a612-7ebd-c225-4154f71e56df
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCE1E:2A5AF:6DC2D:9294A:6A4EA978
html-safe-noncef6a3e6b2344b32701056f1d082b5f9817aa0ff40e3795d0a11175f2041df64c3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTFFOjJBNUFGOjZEQzJEOjkyOTRBOjZBNEVBOTc4IiwidmlzaXRvcl9pZCI6IjcyNzg5OTA2MDgwMTc4MjgyMTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc52ac06a400da6e60fcb11d73d89a47bc9aadf94d16196cfd043dc647e2285d1
hovercard-subject-tagissue:4093670220
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/commitizen-tools/commitizen/1899/issue_layout
twitter:imagehttps://opengraph.githubassets.com/309f7985d328c3a927b34364ed626fa8728b57f062018fa461775974691d6f1c/commitizen-tools/commitizen/issues/1899
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/309f7985d328c3a927b34364ed626fa8728b57f062018fa461775974691d6f1c/commitizen-tools/commitizen/issues/1899
og:image:altDescription When message_length_limit is configured (e.g., in pyproject.toml), cz commit / cz check should enforce it unless the user explicitly overrides it via the CLI -l/--message-length-limit. ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamettw225
hostnamegithub.com
expected-hostnamegithub.com
None41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c
turbo-cache-controlno-preview
go-importgithub.com/commitizen-tools/commitizen git https://github.com/commitizen-tools/commitizen.git
octolytics-dimension-user_id62252524
octolytics-dimension-user_logincommitizen-tools
octolytics-dimension-repository_id106127589
octolytics-dimension-repository_nwocommitizen-tools/commitizen
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id106127589
octolytics-dimension-repository_network_root_nwocommitizen-tools/commitizen
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee6a744804e8e70f97b4d5a18a94dcc63db22f97a
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/commitizen-tools/commitizen/issues/1899#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fissues%2F1899
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fissues%2F1899
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=commitizen-tools%2Fcommitizen
Reloadhttps://github.com/commitizen-tools/commitizen/issues/1899
Reloadhttps://github.com/commitizen-tools/commitizen/issues/1899
Reloadhttps://github.com/commitizen-tools/commitizen/issues/1899
Please reload this pagehttps://github.com/commitizen-tools/commitizen/issues/1899
commitizen-tools https://github.com/commitizen-tools
commitizenhttps://github.com/commitizen-tools/commitizen
Please reload this pagehttps://github.com/commitizen-tools/commitizen/issues/1899
Notifications https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Fork 344 https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Star 3.5k https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Code https://github.com/commitizen-tools/commitizen
Issues 116 https://github.com/commitizen-tools/commitizen/issues
Pull requests 45 https://github.com/commitizen-tools/commitizen/pulls
Discussions https://github.com/commitizen-tools/commitizen/discussions
Actions https://github.com/commitizen-tools/commitizen/actions
Projects https://github.com/commitizen-tools/commitizen/projects
Security and quality 0 https://github.com/commitizen-tools/commitizen/security
Insights https://github.com/commitizen-tools/commitizen/pulse
Code https://github.com/commitizen-tools/commitizen
Issues https://github.com/commitizen-tools/commitizen/issues
Pull requests https://github.com/commitizen-tools/commitizen/pulls
Discussions https://github.com/commitizen-tools/commitizen/discussions
Actions https://github.com/commitizen-tools/commitizen/actions
Projects https://github.com/commitizen-tools/commitizen/projects
Security and quality https://github.com/commitizen-tools/commitizen/security
Insights https://github.com/commitizen-tools/commitizen/pulse
Fix: message_length_limit config is ignored when CLI flag is unset (commit/check)https://github.com/commitizen-tools/commitizen/issues/1899#top
issue-status: needs-triagehttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22issue-status%3A%20needs-triage%22
os: macOShas issue on macOShttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22os%3A%20macOS%22
type: bughttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com/ttw225
ttw225https://github.com/ttw225
on Mar 18, 2026https://github.com/commitizen-tools/commitizen/issues/1899#issue-4093670220
https://private-user-images.githubusercontent.com/35064951/565416531-34f7643b-a782-4f44-9704-ba9bd610be34.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODM1NDAzODgsIm5iZiI6MTc4MzU0MDA4OCwicGF0aCI6Ii8zNTA2NDk1MS81NjU0MTY1MzEtMzRmNzY0M2ItYTc4Mi00ZjQ0LTk3MDQtYmE5YmQ2MTBiZTM0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzA4VDE5NDgwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZiZGU3NzExMmJhMGM1MWI1ZDVhNzViNWMwZTMxM2FhYzY0MWUwZjU5MGVlNmNmNzYzMmM2ODlhM2FiMGY1YmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.WDlrEWb9fRgj3DHBEEZ1ioe5XRU4xRoN-IblDf0v8FA
issue-status: needs-triagehttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22issue-status%3A%20needs-triage%22
os: macOShas issue on macOShttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22os%3A%20macOS%22
type: bughttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.