pub struct AnalysisConfig {
pub modules: AnalysisModules,
pub languages: LanguageSettings,
pub files: FileSettings,
pub quality: QualitySettings,
pub coverage: CoverageSettings,
}Expand description
Unified analysis configuration for the public API
This is the main configuration interface for users. It provides a clean, composable API that automatically handles internal configuration complexity.
Fields§
§modules: AnalysisModulesAnalysis modules to enable
languages: LanguageSettingsLanguage-specific settings
files: FileSettingsFile discovery and filtering
quality: QualitySettingsQuality thresholds and limits
coverage: CoverageSettingsCoverage analysis configuration
Implementations§
Source§impl AnalysisConfig
Constructor and fluent builder methods for AnalysisConfig.
impl AnalysisConfig
Constructor and fluent builder methods for AnalysisConfig.
Sourcepub fn modules(self, f: impl FnOnce(AnalysisModules) -> AnalysisModules) -> Self
pub fn modules(self, f: impl FnOnce(AnalysisModules) -> AnalysisModules) -> Self
Enable/disable analysis modules with a fluent interface
Sourcepub fn languages(
self,
f: impl FnOnce(LanguageSettings) -> LanguageSettings,
) -> Self
pub fn languages( self, f: impl FnOnce(LanguageSettings) -> LanguageSettings, ) -> Self
Configure languages with a fluent interface
Sourcepub fn files(self, f: impl FnOnce(FileSettings) -> FileSettings) -> Self
pub fn files(self, f: impl FnOnce(FileSettings) -> FileSettings) -> Self
Configure file settings with a fluent interface
Sourcepub fn quality(self, f: impl FnOnce(QualitySettings) -> QualitySettings) -> Self
pub fn quality(self, f: impl FnOnce(QualitySettings) -> QualitySettings) -> Self
Configure quality settings with a fluent interface
Sourcepub fn coverage(
self,
f: impl FnOnce(CoverageSettings) -> CoverageSettings,
) -> Self
pub fn coverage( self, f: impl FnOnce(CoverageSettings) -> CoverageSettings, ) -> Self
Configure coverage settings with a fluent interface
Sourcepub fn with_languages(self, languages: Vec<String>) -> Self
pub fn with_languages(self, languages: Vec<String>) -> Self
Set the languages to analyze
Sourcepub fn with_language(self, language: impl Into<String>) -> Self
pub fn with_language(self, language: impl Into<String>) -> Self
Add a language to analyze
Sourcepub fn with_confidence_threshold(self, threshold: f64) -> Self
pub fn with_confidence_threshold(self, threshold: f64) -> Self
Set confidence threshold
Sourcepub fn with_max_files(self, max_files: usize) -> Self
pub fn with_max_files(self, max_files: usize) -> Self
Set maximum number of files to analyze
Sourcepub fn exclude_pattern(self, pattern: impl Into<String>) -> Self
pub fn exclude_pattern(self, pattern: impl Into<String>) -> Self
Add an exclusion pattern
Sourcepub fn include_pattern(self, pattern: impl Into<String>) -> Self
pub fn include_pattern(self, pattern: impl Into<String>) -> Self
Add an inclusion pattern
Sourcepub fn enable_all_modules(self) -> Self
pub fn enable_all_modules(self) -> Self
Enable all analysis modules
Sourcepub fn disable_all_modules(self) -> Self
pub fn disable_all_modules(self) -> Self
Disable all analysis modules (useful for selective enabling)
Sourcepub fn essential_modules_only(self) -> Self
pub fn essential_modules_only(self) -> Self
Enable only essential modules for fast analysis
Sourcepub fn to_valknut_config(self) -> ValknutConfig
pub fn to_valknut_config(self) -> ValknutConfig
Convert to internal ValknutConfig
This method handles the complexity of mapping the clean public API to the detailed internal configuration structure.
Sourcepub fn from_valknut_config(valknut_config: ValknutConfig) -> Result<Self>
pub fn from_valknut_config(valknut_config: ValknutConfig) -> Result<Self>
Create from ValknutConfig
This method handles the reverse conversion from the detailed internal configuration to the simplified public API.
Trait Implementations§
Source§impl Clone for AnalysisConfig
impl Clone for AnalysisConfig
Source§fn clone(&self) -> AnalysisConfig
fn clone(&self) -> AnalysisConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnalysisConfig
impl Debug for AnalysisConfig
Source§impl Default for AnalysisConfig
Default implementation for AnalysisConfig.
impl Default for AnalysisConfig
Default implementation for AnalysisConfig.
Source§impl<'de> Deserialize<'de> for AnalysisConfig
impl<'de> Deserialize<'de> for AnalysisConfig
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>,
Auto Trait Implementations§
impl Freeze for AnalysisConfig
impl RefUnwindSafe for AnalysisConfig
impl Send for AnalysisConfig
impl Sync for AnalysisConfig
impl Unpin for AnalysisConfig
impl UnwindSafe for AnalysisConfig
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().