pub struct SmellDetector { /* private fields */ }Expand description
Main smell detector that runs all enabled detectors.
Implementations§
Source§impl SmellDetector
impl SmellDetector
Sourcepub fn with_config(config: SmellConfig) -> Self
pub fn with_config(config: SmellConfig) -> Self
Create a new smell detector with the given configuration.
Sourcepub fn from_config_file(path: &Path) -> Result<Self>
pub fn from_config_file(path: &Path) -> Result<Self>
Load configuration from a file.
Sourcepub fn config(&self) -> &SmellConfig
pub fn config(&self) -> &SmellConfig
Get the current configuration.
Sourcepub fn min_severity(&self) -> Severity
pub fn min_severity(&self) -> Severity
Get minimum severity from config.
Sourcepub fn analyze_file(&self, path: &Path) -> Result<Report>
pub fn analyze_file(&self, path: &Path) -> Result<Report>
Analyze a file (L5X or PLCopen) and return a report.
Sourcepub fn analyze(&self, project: &LoadedProject) -> Result<Report>
pub fn analyze(&self, project: &LoadedProject) -> Result<Report>
Analyze a loaded project.
Sourcepub fn analyze_controller(&self, controller: &Controller) -> Result<Report>
pub fn analyze_controller(&self, controller: &Controller) -> Result<Report>
Analyze a parsed L5X controller.
Sourcepub fn get_stats_file(&self, path: &Path) -> Result<ParseStats>
pub fn get_stats_file(&self, path: &Path) -> Result<ParseStats>
Get statistics for a file without running smell detection.
Sourcepub fn get_stats(&self, project: &LoadedProject) -> Result<ParseStats>
pub fn get_stats(&self, project: &LoadedProject) -> Result<ParseStats>
Get statistics for a loaded project (L5X format).
Sourcepub fn get_plcopen_stats(&self, project: &LoadedProject) -> Result<PlcopenStats>
pub fn get_plcopen_stats(&self, project: &LoadedProject) -> Result<PlcopenStats>
Get PLCopen statistics for a loaded project.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SmellDetector
impl RefUnwindSafe for SmellDetector
impl Send for SmellDetector
impl Sync for SmellDetector
impl Unpin for SmellDetector
impl UnwindSafe for SmellDetector
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