pub struct CriticAnalyzer { /* private fields */ }Expand description
Perl::Critic analyzer
Implementations§
Source§impl CriticAnalyzer
impl CriticAnalyzer
Sourcepub fn new(
config: CriticConfig,
runtime: Arc<dyn SubprocessRuntime>,
) -> CriticAnalyzer
pub fn new( config: CriticConfig, runtime: Arc<dyn SubprocessRuntime>, ) -> CriticAnalyzer
Creates a new analyzer with the given configuration and runtime.
Sourcepub fn with_os_runtime(config: CriticConfig) -> CriticAnalyzer
pub fn with_os_runtime(config: CriticConfig) -> CriticAnalyzer
Creates a new analyzer with the OS subprocess runtime (non-WASM only).
Sourcepub fn analyze_file(
&mut self,
file_path: &Path,
) -> Result<Vec<Violation>, String>
pub fn analyze_file( &mut self, file_path: &Path, ) -> Result<Vec<Violation>, String>
Run Perl::Critic on a file
Sourcepub fn invalidate_cache(&mut self, file_path: &str)
pub fn invalidate_cache(&mut self, file_path: &str)
Clear cache for a file
Sourcepub fn to_diagnostics(&self, violations: &[Violation]) -> Vec<Diagnostic>
pub fn to_diagnostics(&self, violations: &[Violation]) -> Vec<Diagnostic>
Convert violations to diagnostics
Auto Trait Implementations§
impl Freeze for CriticAnalyzer
impl !RefUnwindSafe for CriticAnalyzer
impl Send for CriticAnalyzer
impl Sync for CriticAnalyzer
impl Unpin for CriticAnalyzer
impl UnsafeUnpin for CriticAnalyzer
impl !UnwindSafe for CriticAnalyzer
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