pub struct RuleDetector { /* private fields */ }Expand description
Main rule detector that runs all enabled detectors.
Implementations§
Source§impl RuleDetector
impl RuleDetector
Sourcepub fn with_config(config: RuleConfig) -> Self
pub fn with_config(config: RuleConfig) -> Self
Create a new rule 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) -> &RuleConfig
pub fn config(&self) -> &RuleConfig
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 rule 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.