You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check whether unknown configuration exists in the configuration file when strict_config=True is passed. It should work like --strict-markers in pytest. It can avoid typo in the configuration.
Possible Solution
add strict_config as a configuration
define the valid configurations
check unknown key in base_config if strict_config=True
If any configuration not supported by commitizen exists in the section [tool.commitizen], any commtizen command should fail with an error message saying which configuration is not supported.
Days ago, I tried to reproduce #297, but forget that I didn't have the latest commitizen installed which does not yet support update_changelog_on_bump.
Also, I think it might be great if an user can list all the configuration through cli like pytest --fixtures does.
We can also validate the type of each value in the same patch. I am not sure whether we have done type validation in configuration files / command line.
Activity
woile commentedon Nov 14, 2020
How would this work? What do you envision and what's the use case?
Lee-W commentedon Nov 15, 2020
If any configuration not supported by commitizen exists in the section
[tool.commitizen], any commtizen command should fail with an error message saying which configuration is not supported.Days ago, I tried to reproduce #297, but forget that I didn't have the latest commitizen installed which does not yet support
update_changelog_on_bump.Also, I think it might be great if an user can list all the configuration through cli like
pytest --fixturesdoes.bearomorphism commentedon Nov 22, 2025
I think warnings may make more sense. Failing with an error message sounds a bit too aggressive. But it is ok to fail when
strict_config = Truebearomorphism commentedon Nov 22, 2025
We can also validate the type of each value in the same patch. I am not sure whether we have done type validation in configuration files / command line.
Lee-W commentedon Nov 30, 2025
We're using decli (a wrapper based on argparse). It technically can do type validation if I'm not wrong.
feat(config): add strict_config option to reject unknown config keys