Skip to content

Updating the configuration file

If there is a new configuration option that is required to accommodate a new feature, such as adding a new lint, then both the ConfigFile and InstantiatedConfig structs will need to be modified, accordingly.

The ConfigFile is a struct that is used to serialize values from the configuration file into the scilo code. All of its fields should be typed as Options so that the user does not need to specify its value in the file to be parsed correctly. When values are omitted from the file, default values are used in their places.

A default configuration file is stored in /crates/lib/src/config.toml and is used by the init subcommand in the CLI. If changes to the configuration are made, this default file, as well as doc comments and the configuration should be updated.

The InstantiatedConfig is what is generated internally from the ConfigFile once it is parsed. It replaces missing values with defaults, it resolves merging issues across files from multiple configuration locations, and more.

We want to try our best to keep this configuration file format backwards compatible after a 1.0 release.