pub struct InstantiatedConfig {
pub root_dirs: RootDirs,
pub code_results_subdir_regex: Option<Regex>,
pub lints: Vec<LintCheck>,
pub root_files: Vec<PathBuf>,
pub readme_names: Option<Vec<String>>,
pub workflow_names: Option<Vec<String>>,
pub ignored: Vec<PathBuf>,
}Expand description
The internal representation of all the important files, directories, and lints to check.
This data structure isn’t created directly from a configuration file.
It is instead instantiated from the ConfigFile struct, using some intermediate
logic that can fail along the way.
Fields§
§root_dirs: RootDirsExpected top-level directories to organize the project folder.
code_results_subdir_regex: Option<Regex>Regular expression for units of analysis within the code and their matching results.
The default value for this regular expression is CODE_RESULTS_SUBDIR_REGEX.
lints: Vec<LintCheck>The explicit list of lint checks that should be performed.
See LintCheck for the complete list.
root_files: Vec<PathBuf>The explicit list of files that should be present at the root of the project directory.
readme_names: Option<Vec<String>>The file name for the READMEs that should be present within each
subdirectory in the code and data
directories.
workflow_names: Option<Vec<String>>The file name for the workflow file that should be present within each
subdirectory in the code directory.
ignored: Vec<PathBuf>The set of directories that are ignored during checks.
Implementations§
Source§impl InstantiatedConfig
impl InstantiatedConfig
Sourcepub fn execute_lints(self) -> Result<(), LintError>
pub fn execute_lints(self) -> Result<(), LintError>
The main method to run all the requested lints on the project directory.
Sourcepub(crate) fn check_root_dirs(&self) -> Result<(), LintError>
pub(crate) fn check_root_dirs(&self) -> Result<(), LintError>
Check for the presence of each required root directory.
Sourcepub(crate) fn check_root_files(&self) -> Result<(), LintError>
pub(crate) fn check_root_files(&self) -> Result<(), LintError>
Check for the presence of each required file in the project root.
Sourcepub(crate) fn check_code_subdir_workflows(&self) -> Result<(), LintError>
pub(crate) fn check_code_subdir_workflows(&self) -> Result<(), LintError>
Check for the presence of workflow files within each code subdirectory.
Sourcepub(crate) fn check_code_subdir_readmes(&self) -> Result<(), LintError>
pub(crate) fn check_code_subdir_readmes(&self) -> Result<(), LintError>
Check for the existence of at least one acceptable README file in the code directory.
Sourcepub(crate) fn check_data_subdir_readmes(&self) -> Result<(), LintError>
pub(crate) fn check_data_subdir_readmes(&self) -> Result<(), LintError>
Check for the existence of at least one acceptable README file in the data directory.
Sourcepub(crate) fn check_code_results_subdir_regex(&self) -> Result<(), LintError>
pub(crate) fn check_code_results_subdir_regex(&self) -> Result<(), LintError>
Trait Implementations§
Source§impl Clone for InstantiatedConfig
impl Clone for InstantiatedConfig
Source§fn clone(&self) -> InstantiatedConfig
fn clone(&self) -> InstantiatedConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more