#[non_exhaustive]pub struct Config {
pub format: FormatConfig,
pub lint: LintConfig,
pub excluded_dirs: Vec<String>,
pub respect_gitignore: bool,
}Expand description
The full configuration for a run.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.format: FormatConfig§lint: LintConfig§excluded_dirs: Vec<String>§respect_gitignore: boolSkip files a .gitignore covers.
On, because a .gd file git has been told to ignore is almost always
something generated or vendored, and reporting on it is noise about
code nobody is going to edit. A path named directly on the command line
is still processed: naming a file is a stronger signal than a pattern.
Implementations§
Source§impl Config
impl Config
Sourcepub fn is_excluded_dir(&self, name: &str) -> bool
pub fn is_excluded_dir(&self, name: &str) -> bool
Whether a directory name should be skipped when collecting files.
Sourcepub fn to_toml(&self) -> String
pub fn to_toml(&self) -> String
Write these settings out as a gdck.toml.
Every setting is written, including the ones left at their default, because the question this answers is what a run is actually using.
Sourcepub fn to_starter_toml(&self) -> String
pub fn to_starter_toml(&self) -> String
Write these settings out as a gdck.toml for a project to keep.
Every setting appears, but the ones still at their default are commented out. The live lines are then what this project decided, and the commented ones are a catalogue to uncomment from — and a project inherits later changes to a default rather than pinning today’s value without meaning to.
This is what gdck init writes. to_toml is the
other question — what a run is using — and answers it in full.
Trait Implementations§
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.