Skip to content

Commit 18e47b9

Browse files
committed
readme
1 parent aa18978 commit 18e47b9

3 files changed

Lines changed: 108 additions & 5 deletions

File tree

‎Cargo.lock‎

Lines changed: 14 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎plceye/Cargo.toml‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,20 @@
22
name = "plceye"
33
version = "0.1.0"
44
edition = "2021"
5-
description = "PLC code smell detector for L5X files"
5+
description = "PLC code smell detector and static analyzer for L5X files"
66
license = "MIT"
7+
repository = "https://github.com/radevgit/plc"
8+
homepage = "https://github.com/radevgit/plc"
9+
documentation = "https://docs.rs/plceye"
10+
readme = "README.md"
11+
keywords = ["plc", "l5x", "static-analysis", "code-smell", "rockwell"]
12+
categories = ["command-line-utilities", "development-tools"]
13+
authors = ["radevgit"]
14+
rust-version = "1.70"
715

816
[dependencies]
9-
l5x = { path = "../l5x" }
10-
iecst = { path = "../iecst" }
17+
l5x = "0.3"
18+
iecst = "0.1"
1119
quick-xml = { version = "0.37", features = ["serialize"] }
1220
serde = { version = "1.0", features = ["derive"] }
1321
serde_json = "1.0"

‎plceye/README.md‎

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# plceye
2+
3+
A static analyzer and code smell detector for Rockwell Automation L5X files (Studio 5000 Logix Designer).
4+
5+
## Features
6+
7+
- **Unused Tags** - Detect tags that are defined but never referenced
8+
- **Undefined Tags** - Find tags referenced in code but not declared
9+
- **Empty Routines** - Identify routines with no logic
10+
- **Configurable** - Customize detection via `plceye.toml`
11+
12+
## Installation
13+
14+
```bash
15+
cargo install plceye
16+
```
17+
18+
## Usage
19+
20+
```bash
21+
# Analyze a single file
22+
plceye project.L5X
23+
24+
# Analyze multiple files
25+
plceye *.L5X
26+
27+
# Use custom configuration
28+
plceye --config plceye.toml project.L5X
29+
30+
# Generate default configuration
31+
plceye init
32+
```
33+
34+
## Configuration
35+
36+
Create a `plceye.toml` file to customize detection:
37+
38+
```toml
39+
[unused_tags]
40+
enabled = true
41+
severity = "info"
42+
# Ignore tags matching these patterns
43+
ignore = ["zz*", "Spare_*", "_*"]
44+
45+
[undefined_tags]
46+
enabled = true
47+
severity = "warning"
48+
# Known valid references (aliases, I/O modules)
49+
ignore = ["Local:*", "S:*"]
50+
51+
[empty_routines]
52+
enabled = true
53+
severity = "info"
54+
ignore = ["*_Template"]
55+
```
56+
57+
## Output
58+
59+
```
60+
=== project.L5X ===
61+
[info] unused-tag: Controller - Tag 'Spare_01' is defined but never used
62+
[warning] undefined-tag: Program:Main - Tag 'Unknown' is referenced but not defined
63+
64+
Found 2 issue(s) in 1 file(s).
65+
```
66+
67+
## Detected Issues
68+
69+
| Issue | Description | Default Severity |
70+
|-------|-------------|------------------|
71+
| `unused-tag` | Tag defined but never referenced | info |
72+
| `undefined-tag` | Tag referenced but not defined | warning |
73+
| `empty-routine` | Routine with no executable logic | info |
74+
75+
## Disclaimer
76+
77+
This is an independent open-source project and is not affiliated with, endorsed by, or associated with Rockwell Automation, Inc.
78+
79+
"Rockwell Automation", "Allen-Bradley", "Studio 5000", and "Logix Designer" are trademarks of Rockwell Automation, Inc.
80+
81+
## License
82+
83+
MIT License - see [LICENSE](LICENSE) for details.

0 commit comments

Comments
 (0)