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.

Changing default configuration values

If you are changing the default value for an existing option, you should update the following files:

  • crates/lib/src/config/instantiated_config/defaults.rs 1
  • crates/lib/src/config.toml 2
  • docs/configuration.md 3

Default values are not typically listed in the CLI help docs. If they are, they are provided by the argument parser, which should be referencing the internal variables and constants, directly.


  1. This file contains the default values used by InstantiatedConfig

  2. This is the default file that is used by the init subcommand. 

  3. This is the public documentation that users, both new and old, may consult for default values.