Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough
ChangesOpenOCD Path Resolution Refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
bundles/com.espressif.idf.core/src/com/espressif/idf/core/util/IDFUtil.java (1)
349-350: ⚡ Quick winUse block braces for the changed
ifbodyThe new one-line
ifreturn does not follow the Java block brace rule used by this repository for these paths.As per coding guidelines,
bundles/*/src/**/*.java: “Place opening brace on the next line for types, methods, constructors, blocks, and switch statements; use end-of-line brace for lambda bodies and array initializers”.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bundles/com.espressif.idf.core/src/com/espressif/idf/core/util/IDFUtil.java` around lines 349 - 350, The if statement checking StringUtil.isEmpty(openOCDScriptPath) does not follow the repository's Java formatting guidelines for block braces. Modify the single-line if statement to use explicit block braces by placing the opening brace on the next line after the condition and the closing brace after the return statement, following the repository's style rule that requires opening braces on the next line for blocks and statements.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@bundles/com.espressif.idf.core/src/com/espressif/idf/core/util/IDFUtil.java`:
- Line 352: In the getOpenOCDLocation() method, wrap the
Paths.get(openOCDScriptPath).resolve("../../../bin").normalize().toString() call
in a try-catch block to handle the InvalidPathException that can be thrown when
OPENOCD_SCRIPTS contains malformed path characters. Return null or an
appropriate default value in the catch block to allow callers like
getOpenocdVersion() to fail gracefully. Additionally, fix the bracing style of
the if statement at line 349 by moving the opening brace to the next line to
follow the project's code style guidelines.
---
Nitpick comments:
In `@bundles/com.espressif.idf.core/src/com/espressif/idf/core/util/IDFUtil.java`:
- Around line 349-350: The if statement checking
StringUtil.isEmpty(openOCDScriptPath) does not follow the repository's Java
formatting guidelines for block braces. Modify the single-line if statement to
use explicit block braces by placing the opening brace on the next line after
the condition and the closing brace after the return statement, following the
repository's style rule that requires opening braces on the next line for blocks
and statements.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: df9647b5-ea91-496b-96df-8bab0059e487
📒 Files selected for processing (1)
bundles/com.espressif.idf.core/src/com/espressif/idf/core/util/IDFUtil.java
Description
Changed approach to getting bin path from the openocd_scripts variable
Fixes # (IEP-1787)
Type of change
Please delete options that are not relevant.
How has this been tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Dependent components impacted by this PR:
Checklist
Summary by CodeRabbit
Summary
Bug Fixes
Refactor