-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Currently, the runtime, local and shared config performs no validity checks when setting or appending values. Instead, those checks are delegated to the code that uses Config, which scatters the validation code across the entire codebase.
We should make the config module a bit more robust:
- It should explicitly list all the keys that are allowed and recognized within a configuration file.
- Moreover, for each key, it should be explicitly specified whether that key supports scalar or list values.
- It should also explicitly specify the validation logic for the value(s) of each key, e.g., a list of allowed values, validation callable, etc.
This will arguably lead to a less flexible usage of configuration, however, it will be easier to maintain and safer to use (reporting invalid keys, invalid types of values, invalid values).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels