InstantiatedConfig

Struct InstantiatedConfig 

Source
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>>,
}
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: RootDirs

Expected 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.

Implementations§

Source§

impl InstantiatedConfig

Source

pub fn execute_lints(self) -> Result<(), LintError>

The main method to run all the requested lints on the project directory.

Trait Implementations§

Source§

impl Clone for InstantiatedConfig

Source§

fn clone(&self) -> InstantiatedConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InstantiatedConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for InstantiatedConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl TryFrom<&ConfigFile> for InstantiatedConfig

Source§

type Error = ConfigError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &ConfigFile) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<&Path> for InstantiatedConfig

Source§

type Error = ConfigError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &Path) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<&PathBuf> for InstantiatedConfig

Source§

type Error = ConfigError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &PathBuf) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ConfigFile> for InstantiatedConfig

Source§

type Error = ConfigError

The type returned in the event of a conversion error.
Source§

fn try_from(value: ConfigFile) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<PathBuf> for InstantiatedConfig

Source§

type Error = ConfigError

The type returned in the event of a conversion error.
Source§

fn try_from(value: PathBuf) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.