Crate plceye

Crate plceye 

Source
Expand description

plceye - PLC Code Smell Detector

Open source static analyzer for PLC files that detects code smells and potential issues in PLC programs.

§Supported Formats

  • L5X - Rockwell Automation Studio 5000
  • PLCopen XML - IEC 61131-3 standard exchange format

§Supported Smells

  • unused_tags - Tags defined but never used
  • undefined_tags - Tags referenced but not defined
  • empty_routines - Routines with no logic

§CLI Usage

# Analyze a file
plceye project.L5X

# With custom config
plceye --config plceye.toml project.L5X

Re-exports§

pub use analysis::ProjectAnalysis;
pub use analysis::ParseStats;
pub use analysis::analyze_controller;
pub use analysis::PlcopenAnalysis;
pub use analysis::PlcopenStats;
pub use analysis::analyze_plcopen_project;
pub use l5x;
pub use plcopen;

Modules§

analysis
Project analysis module.

Structs§

EmptyRoutinesConfig
Configuration for empty routine detection.
GeneralConfig
General configuration settings.
LoadedProject
A loaded project with its format-specific data.
Report
Report containing all detected smells.
Smell
A single detected code smell.
SmellConfig
Main configuration for the smell detector.
SmellDetector
Main smell detector that runs all enabled detectors.
UndefinedTagsConfig
Configuration for undefined tag detection.
UnusedTagsConfig
Configuration for unused tag detection.

Enums§

ConfigErrorKind
Kinds of configuration errors.
Error
Error types for the smell detector.
FileFormat
Detected file format.
L5xParseErrorKind
Kinds of L5X parse errors.
Severity
Severity level of a detected smell.
SmellKind
Kind of code smell detected.

Type Aliases§

Result
Result type alias for smell operations.