pub struct Analyzer { /* private fields */ }Expand description
@acp:summary “Analyzes source files for ACP annotation coverage” @acp:lock normal
Implementations§
Source§impl Analyzer
impl Analyzer
Sourcepub fn new(config: &Config) -> Result<Self>
pub fn new(config: &Config) -> Result<Self>
@acp:summary “Creates a new analyzer with the given configuration”
Sourcepub fn with_level(self, level: AnnotateLevel) -> Self
pub fn with_level(self, level: AnnotateLevel) -> Self
@acp:summary “Sets the annotation level for gap detection”
Sourcepub fn discover_files(
&self,
root: &Path,
filter: Option<&str>,
) -> Result<Vec<PathBuf>>
pub fn discover_files( &self, root: &Path, filter: Option<&str>, ) -> Result<Vec<PathBuf>>
@acp:summary “Discovers files to analyze based on configuration”
Walks the directory tree and filters files based on include/exclude patterns from the configuration.
Sourcepub fn analyze_file(&self, file_path: &Path) -> Result<AnalysisResult>
pub fn analyze_file(&self, file_path: &Path) -> Result<AnalysisResult>
@acp:summary “Analyzes a single file for annotation coverage”
Parses the file, extracts symbols and existing annotations, and identifies gaps where annotations are missing.
Sourcepub fn has_existing_cache(&self, root: &Path) -> bool
pub fn has_existing_cache(&self, root: &Path) -> bool
@acp:summary “Checks if a cache exists and has been initialized”
Sourcepub fn calculate_total_coverage(results: &[AnalysisResult]) -> f32
pub fn calculate_total_coverage(results: &[AnalysisResult]) -> f32
@acp:summary “Calculates total coverage across multiple analysis results”
Auto Trait Implementations§
impl !Freeze for Analyzer
impl RefUnwindSafe for Analyzer
impl Send for Analyzer
impl Sync for Analyzer
impl Unpin for Analyzer
impl UnwindSafe for Analyzer
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
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>
Converts
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>
Converts
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 more