Skip to content

Commit 8307703

Browse files
committed
Refactor PLCopen project analysis and detection
- Introduced PLCopen-specific analysis and detection modules. - Replaced model-based detectors with PLCopen-specific detectors for unused variables, undefined variables, and empty POUs. - Updated the `SmellDetector` to analyze PLCopen projects and generate reports accordingly. - Enhanced the `LoadedProject` structure to support PLCopen projects. - Removed obsolete model-based smell detectors and related code. - Improved statistics gathering for PLCopen projects. - Added glob pattern matching for ignoring specific variables and POUs in detection.
1 parent 03b38b9 commit 8307703

10 files changed

Lines changed: 490 additions & 531 deletions

File tree

‎Cargo.lock‎

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎plceye/Cargo.toml‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,9 @@ authors = ["radevgit"]
1414
rust-version = "1.70"
1515

1616
[dependencies]
17-
# Format parsers with plcmodel conversion
18-
l5x = { path = "../l5x", features = ["model"] }
19-
plcopen = { path = "../plcopen", features = ["model"] }
20-
21-
# Core model
22-
plcmodel = { path = "../plcmodel" }
17+
# Format parsers
18+
l5x = { path = "../l5x" }
19+
plcopen = { path = "../plcopen" }
2320
iectypes = { path = "../iectypes" }
2421

2522
# ST parsing

‎plceye/src/analysis/mod.rs‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
//! parse code, and build cross-reference indices.
55
//!
66
//! - `l5x_analysis` - L5X-specific detailed analysis
7-
//! - `model_analysis` - Format-independent analysis using plcmodel
7+
//! - `plcopen_analysis` - PLCopen-specific analysis
88
99
mod l5x_analysis;
10-
mod model_analysis;
10+
mod plcopen_analysis;
1111
mod rll_parsing;
1212
mod st_parsing;
1313

@@ -19,7 +19,10 @@ pub use l5x_analysis::{
1919
analyze_controller,
2020
};
2121

22-
pub use model_analysis::{ModelAnalysis, ModelStats, VariableDef};
22+
pub use plcopen_analysis::{
23+
PlcopenAnalysis, PlcopenStats, VariableDef, VarClass,
24+
analyze_project as analyze_plcopen_project,
25+
};
2326

2427
pub use rll_parsing::{
2528
parse_routine, parse_rung_collection, extract_rung_text, extract_text_content,

0 commit comments

Comments
 (0)