-
Notifications
You must be signed in to change notification settings - Fork 121
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
fix: ensure clangd file exists before writing config attributes #925
Conversation
WalkthroughThe update brings enhancements to the ESP-IDF Eclipse plugin, focusing on Clangd configuration file handling improvements and error handling logic in the project wizard. These changes aim to streamline project setup, enhance YAML file management, and refine error handling for a better development experience in the Eclipse environment. Changes
Possibly related issues
Poem
Warning Following problems were encountered
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
Review Status
Configuration used: CodeRabbit UI
Files selected for processing (2)
- bundles/com.espressif.idf.lsp/src/com/espressif/idf/lsp/ClangdConfigFileHandler.java (2 hunks)
- bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/wizard/NewIDFProjectWizard.java (2 hunks)
Additional comments not posted (2)
bundles/com.espressif.idf.lsp/src/com/espressif/idf/lsp/ClangdConfigFileHandler.java (2)
32-32
: Ensure that callers of theupdate
method properly handle the newly thrownCoreException
andIOException
.
76-89
: Validate the approach of creating the.clangd
file directly in thegetClangdConfigFile
method. Consider the implications of file creation in a method that suggests it only retrieves a file.
import java.nio.file.Files; | ||
import java.nio.file.Path; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider grouping java.nio.file
imports for better readability.
-import java.nio.file.Files;
-import java.nio.file.Path;
+import java.nio.file.*;
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.*; |
bundles/com.espressif.idf.lsp/src/com/espressif/idf/lsp/ClangdConfigFileHandler.java
Outdated
Show resolved
Hide resolved
bundles/com.espressif.idf.lsp/src/com/espressif/idf/lsp/ClangdConfigFileHandler.java
Outdated
Show resolved
Hide resolved
bundles/com.espressif.idf.lsp/src/com/espressif/idf/lsp/ClangdConfigFileHandler.java
Outdated
Show resolved
Hide resolved
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/wizard/NewIDFProjectWizard.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Status
Configuration used: CodeRabbit UI
Files selected for processing (1)
- bundles/com.espressif.idf.lsp/src/com/espressif/idf/lsp/ClangdConfigFileHandler.java (1 hunks)
Files not reviewed due to errors (1)
- ClangdConfigFileHandler.java (no review received)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@kolipakakondal @sigmaaa hi ! Tested under: do see .clangd file after project creation. File content: build project -> do not see indexer errors in editor. |
* fix: ensure clangd file exists before writing config attributes * fix: improve code readability
Description
Ensure clangd file exists. If does not exist, create a new file and write the default config attributes
Fixes # (IEP-1192)
Type of change
How has this been tested?
Test Configuration:
Dependent components impacted by this PR:
Checklist
Summary by CodeRabbit
CompileFlags
section in configuration files.