pub(crate) struct ConfigFile {
pub(super) root_dirs: Option<ConfigFileRootDirs>,
pub(super) root_files: Option<Vec<String>>,
pub(super) code_results_subdir_regex: Option<String>,
pub(super) lints: Option<Vec<String>>,
pub(super) readme_names: Option<Vec<String>>,
pub(super) workflow_names: Option<Vec<String>>,
}Expand description
A temporary structure used to parse configuration files within a directory.
This temporary structure partially goes against the “parse, don’t validate” maxim, but it is necessary for combining multiple configurations together from different locations on a user’s system.
Every field within this struct is an Option or a Vec, which allows
the configuration files to be partially specified.
Not every field needs to be included in every file, which is much more
user-friendly.
Instead of using the ConfigFile directly, we will instantiate a set of configuration
settings for all files within a given directory.
InstantiatedConfig contains the settings that
will be used to lint all files within a given directory.
Fields§
§root_dirs: Option<ConfigFileRootDirs>Required directories at the project root.
See RootDirs for details.
root_files: Option<Vec<String>>Required files at the project root.
code_results_subdir_regex: Option<String>Regular expression for units of analysis within the code and their matching results.
lints: Option<Vec<String>>Names of the checks that should be performed when running the lint subcommand.
readme_names: Option<Vec<String>>Acceptable file names for the READMEs that should be present within each
subdirectory in the code and
data directories.
workflow_names: Option<Vec<String>>Acceptable file names for the workflow files that should be present
within each subdirectory in the code
Trait Implementations§
Source§impl Clone for ConfigFile
impl Clone for ConfigFile
Source§fn clone(&self) -> ConfigFile
fn clone(&self) -> ConfigFile
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more