#14 feat: add PERF016 rule detecting repeated scans of the same table - #109
Conversation
Rust Diff AnalysisTip PR size is within limits. Good job keeping changes focused! Limits — configured thresholds for this repository
Understanding the metrics:
Summary — breakdown of changes by category
Production Changes — 6 units modified
Test Changes — 3 units modified
Analysis ScopeAnalyzed: 3 Rust files Skipped files:
Skipped file list:
|
Cargo Quality AnalysisTip All quality checks passed. Code meets all standards! Results — issues found by each analyzer
Analyzers — what each check does
Raw Output — detailed analysis log |
| pub struct RepeatedTableScan; | ||
|
|
||
| /// Counts FROM/JOIN references to `table` at word boundaries. | ||
| fn table_scan_count(upper: &str, table: &str) -> usize { |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Closes #14
New performance rule PERF016 (Info): flags statements that scan one table multiple times (self-joins, repeated subqueries over the same data) by counting word-bounded FROM/JOIN references. A CTE, window function, or conditional aggregation usually reads the table once.
Local checks: fmt, clippy -D warnings, tests, cargo qual (0 issues), mdbook build — all green.