pub struct RepositoryScanner { /* private fields */ }
Expand description
Repository scanner for discovering source files
Implementations§
Source§impl RepositoryScanner
impl RepositoryScanner
Sourcepub fn with_exclude_dirs(exclude_dirs: Vec<String>) -> Self
pub fn with_exclude_dirs(exclude_dirs: Vec<String>) -> Self
Create a repository scanner with custom exclude directories
Sourcepub fn with_dependency_mode(self, mode: DependencyMode) -> Self
pub fn with_dependency_mode(self, mode: DependencyMode) -> Self
Set dependency scanning mode
Sourcepub fn add_exclude_dirs(&mut self, dirs: Vec<String>)
pub fn add_exclude_dirs(&mut self, dirs: Vec<String>)
Add additional directories to exclude
Sourcepub fn with_extensions(self, extensions: Vec<String>) -> Self
pub fn with_extensions(self, extensions: Vec<String>) -> Self
Set supported file extensions
Sourcepub async fn scan_repository<P: AsRef<Path>>(
&self,
repo_path: P,
progress_reporter: Arc<dyn ProgressReporter>,
) -> Result<ScanResult>
pub async fn scan_repository<P: AsRef<Path>>( &self, repo_path: P, progress_reporter: Arc<dyn ProgressReporter>, ) -> Result<ScanResult>
Scan a repository directory and discover source files
Sourcepub fn discover_files<P: AsRef<Path>>(
&self,
repo_path: P,
) -> Result<Vec<PathBuf>>
pub fn discover_files<P: AsRef<Path>>( &self, repo_path: P, ) -> Result<Vec<PathBuf>>
Discover all potential files in the repository
Sourcepub fn detect_language<P: AsRef<Path>>(&self, file_path: P) -> Language
pub fn detect_language<P: AsRef<Path>>(&self, file_path: P) -> Language
Detect programming language from file path
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RepositoryScanner
impl RefUnwindSafe for RepositoryScanner
impl Send for RepositoryScanner
impl Sync for RepositoryScanner
impl Unpin for RepositoryScanner
impl UnwindSafe for RepositoryScanner
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