plceye
A static analyzer and code smell detector for Rockwell Automation L5X files (Studio 5000 Logix Designer).
Features
- Unused Tags - Detect tags that are defined but never referenced
- Undefined Tags - Find tags referenced in code but not declared
- Empty Routines - Identify routines with no logic
- Configurable - Customize detection via
plceye.toml
Installation
Usage
# Analyze a single file
# Analyze multiple files
# Use custom configuration
# Generate default configuration
Configuration
Create a plceye.toml file to customize detection:
[]
= true
= "info"
# Ignore tags matching these patterns
= ["zz*", "Spare_*", "_*"]
[]
= true
= "warning"
# Known valid references (aliases, I/O modules)
= ["Local:*", "S:*"]
[]
= true
= "info"
= ["*_Template"]
Output
=== project.L5X ===
[info] unused-tag: Controller - Tag 'Spare_01' is defined but never used
[warning] undefined-tag: Program:Main - Tag 'Unknown' is referenced but not defined
Found 2 issue(s) in 1 file(s).
Detected Issues
| Issue | Description | Default Severity |
|---|---|---|
unused-tag |
Tag defined but never referenced | info |
undefined-tag |
Tag referenced but not defined | warning |
empty-routine |
Routine with no executable logic | info |
Disclaimer
This is an independent open-source project and is not affiliated with, endorsed by, or associated with Rockwell Automation, Inc.
"Rockwell Automation", "Allen-Bradley", "Studio 5000", and "Logix Designer" are trademarks of Rockwell Automation, Inc.
License
MIT License - see LICENSE for details.