Expand description
plceye - PLC Code Rule Detector
Open source static analyzer for PLC files that detects code rules and potential issues in PLC programs.
§Supported Formats
- L5X - Rockwell Automation Studio 5000
- PLCopen XML - IEC 61131-3 standard exchange format
§Supported Rules (Open Source)
- S0001: unused_tags - Tags defined but never used
- S0002: undefined_tags - Tags referenced but not defined
- S0003: empty_routines - Routines with no logic
- S0004: unused_aois - AOIs defined but never called
- S0005: unused_datatypes - User-defined types never used
- M0001: cyclomatic_complexity - ST routines with high complexity
- M0003: deep_nesting - Control structures nested too deeply
§CLI Usage
# Analyze a file
plceye project.L5X
# With custom config
plceye --config plceye.toml project.L5XRe-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;pub use iec61131;
Modules§
- analysis
- Project analysis module.
Structs§
- Complexity
Config - Configuration for cyclomatic complexity detection.
- Empty
Routines Config - Configuration for empty routine detection.
- General
Config - General configuration settings.
- Loaded
Project - A loaded project with its format-specific data.
- Nesting
Config - Configuration for deep nesting detection.
- Report
- Report containing all detected rules.
- Rule
- A single detected code rule.
- Rule
Config - Main configuration for the rule detector.
- Rule
Detector - Main rule detector that runs all enabled detectors.
- Undefined
Tags Config - Configuration for undefined tag detection.
- Unused
Aois Config - Configuration for unused AOI detection.
- Unused
Data Types Config - Configuration for unused DataType detection.
- Unused
Tags Config - Configuration for unused tag detection.
Enums§
- Config
Error Kind - Kinds of configuration errors.
- Error
- Error types for the rule detector.
- File
Format - Detected file format.
- L5xParse
Error Kind - Kinds of L5X parse errors.
- Rule
Kind - Kind of code rule detected.
- Severity
- Severity level of a detected rule.
Type Aliases§
- Result
- Result type alias for rule operations.