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
feat(config): add strict_config option to reject unknown config keys
Add a `strict_config` boolean option (default: false). When enabled,
commitizen raises InvalidConfigurationError if any key in the config
file is not a recognised Settings field. This catches typos early
instead of silently ignoring them.
- Add `strict_config` to the Settings TypedDict and DEFAULT_SETTINGS
- Add `_VALID_CONFIG_KEYS` in base_config derived from Settings.__annotations__
- Validate unknown keys in BaseConfig.update() when strict_config=True
- Route all _parse_setting calls through self.update() so validation runs
- Add tests covering TOML, JSON, YAML parsers and edge cases
Closes#300
0 commit comments