hakoerber / git-repo-manager

A git tool to manage worktrees and integrate with GitHub and GitLab
https://hakoerber.github.io/git-repo-manager/
GNU General Public License v3.0
62 stars 9 forks source link

Enable serde(deny_unknown_fields) for config structs #47

Open hakoerber opened 1 year ago

hakoerber commented 1 year ago

Right now, the configuration files can contain additional keys without problems, they are just ignored. This is good for backwards compatibility during development, but can lead to confusing situation (e.g. when mistyping a key).

Enabling #[serde(deny_unknown_fields)] for those structs would reject those configuration files.

grm repos sync config -c ~/grm.toml
[✘] Error parsing configuration file "grm.toml": data did not match any variant of untagged enum Config