-
Notifications
You must be signed in to change notification settings - Fork 0
🌟 Nova: The Oracle #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
🌟 Nova: The Oracle #147
Conversation
- Implements `src/experimental/oracle.rs` with checks for unused bindings, complexity, and empty blocks. - Adds `oracle` subcommand to CLI. - Adds unit tests for the Oracle logic. - Updates documentation. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #147 +/- ##
==========================================
- Coverage 79.95% 79.51% -0.45%
==========================================
Files 25 26 +1
Lines 3782 4085 +303
==========================================
+ Hits 3024 3248 +224
- Misses 758 837 +79
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
- Collapsed nested `if let` in `check_unused_bindings` to fix `clippy::collapsible_match`. - Ran `cargo fmt` to fix formatting. - Added comprehensive unit tests to `src/experimental/oracle.rs` covering all statement kinds, deep nesting, and unused function parameters. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Added exhaustive tests for `collect_usages` and `collect_definitions`. - Fixed `CaptureMode::ByValue` error by using `CaptureMode::Move`. - Verified Clippy and formatting. - Re-verified all tests pass. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Added `test_exhaustive_control_flow` to verify definition/usage tracking in If, While, and For statements. - This closes remaining coverage gaps in `collect_definitions` and `collect_usages`. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Added detailed test case `test_exhaustive_definitions` for Traits. - Covers trait method bodies (recursion) and abstract methods (no body). - Fully exercises `collect_definitions` and `collect_usages` for Trait variants. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Moved `src/experimental/oracle.rs` to `src/oracle.rs` to address coverage reporting issues. - Updated `lib.rs` and `main.rs` to reflect the new path. - Ensured exhaustive tests for `collect_definitions` and `collect_usages` are preserved. - Verified all tests pass. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Added tests for `TypeDefinition`, `Return` (None), `Break`, `Continue`, `Print`, `Expression`, and `Query`. - Ensured every `match` arm in `collect_definitions` and `collect_usages` is exercised at least once. - Verified all tests pass. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Added `test_trait_definition_no_body` to cover `collect_definitions` for abstract methods. - Added `test_malformed_binding` and `test_malformed_assignment` to cover defensive checks in `collect_usages` where expressions might be missing. - Verified all tests pass. - This aims to close the final ~8% coverage gap reported by Codecov. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Added `test_trait_definition_no_body` to cover `collect_definitions` for abstract methods. - Added `test_malformed_binding` and `test_malformed_assignment` to cover defensive checks in `collect_usages` where expressions might be missing. - Verified all tests pass. - This aims to close the final ~8% coverage gap reported by Codecov. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Added `test_collection_new_and_literals` to cover empty match arms in usage visitor. - Added `test_trait_impl_empty` to cover empty loops in definition visitor. - Added `test_binding_with_extra_expressions` to cover defensive binding logic. - Verified all 21 tests pass. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Added `test_return_some` to cover `StatementKind::Return { value: Some(v) }`.
- Added `test_match_arm_body_usage` to cover `StatementKind::Match` arm body iteration.
- Added `test_exhaustive_iterator_ops` to cover `Filter`, `Fold`, `Iter`, `Collect`, etc.
- Verified all 24 tests pass.
- This closes the remaining ~8% coverage gap.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Added `test_severity_variants_and_debug` to cover derived code for `Severity` and `Prophecy`. - This targets definition coverage for unused enum variants and debug implementations. - Verified all 25 tests pass. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
💡 The Spark: "The gods are silent when the code is broken. We need an Oracle."
⚠️ Risk: Low. Isolated in
🚀 The Feature: Implemented
Oraclestatic analyzer.🔮 The Potential: Can be expanded with more Greek-themed lints (e.g., checking for hubris/excessive recursion).
src/experimental/.PR created automatically by Jules for task 196275296488929206 started by @madmax983