Open
Description
Enhancement
Currently the CLI uses a *viper.Viper
singleton in the github.com/arduino/arduino-cli/configuration
package to store all the configs, no validation is done when reading the config file but only when editing the config with the config
command.
A great enhancement would be to unmarshal the config file using Viper to a known struct
, this way we won't have a viper.Viper
singleton since it causes some problems and makes it hard to embed certain parts of the CLI, also it will be easier to validate the data read from the config file. Probably it will also enhance writing to file but am not sure. 🤔
This has been inspired by this Fosdem 2019 talk by @carolynvs: https://youtu.be/l89Z0RYseFs?t=1009