pub struct ProjectConfig {
pub project_type: Option<ProjectType>,
pub whitelists: Whitelists,
pub rules: RulesConfig,
pub overrides: Vec<OverrideConfig>,
}Expand description
Project-level configuration - customizable via .garbage-code-hunter.toml
Fields§
§project_type: Option<ProjectType>Project type hint (optional, helps context inference)
whitelists: WhitelistsGlobal whitelist configuration
rules: RulesConfigIndividual rule configurations
overrides: Vec<OverrideConfig>File and directory-level override configuration
Implementations§
Source§impl ProjectConfig
impl ProjectConfig
Sourcepub fn load_from_file(path: &Path) -> Option<Self>
pub fn load_from_file(path: &Path) -> Option<Self>
Load configuration from file, returns default if file doesn’t exist
Sourcepub fn discover(start_dir: &Path) -> Self
pub fn discover(start_dir: &Path) -> Self
Discover configuration in current directory or parent directories
Sourcepub fn get_override_for_path(&self, path: &Path) -> Option<&OverrideConfig>
pub fn get_override_for_path(&self, path: &Path) -> Option<&OverrideConfig>
Get effective override config for the given path (merge all matching overrides)
Trait Implementations§
Source§impl Clone for ProjectConfig
impl Clone for ProjectConfig
Source§fn clone(&self) -> ProjectConfig
fn clone(&self) -> ProjectConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProjectConfig
impl Debug for ProjectConfig
Source§impl Default for ProjectConfig
impl Default for ProjectConfig
Source§fn default() -> ProjectConfig
fn default() -> ProjectConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProjectConfig
impl<'de> Deserialize<'de> for ProjectConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProjectConfig
impl RefUnwindSafe for ProjectConfig
impl Send for ProjectConfig
impl Sync for ProjectConfig
impl Unpin for ProjectConfig
impl UnsafeUnpin for ProjectConfig
impl UnwindSafe for ProjectConfig
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
Mutably borrows from an owned value. Read more