frc5183 / Oatmeal

MIT License
2 stars 0 forks source link

fix(oatmeal): delete before writing to file #26

Closed Trip-kun closed 9 months ago

Trip-kun commented 9 months ago

Seems like a reasonable fix?

Unless you guys have any other ideas

Summary by CodeRabbit

coderabbitai[bot] commented 9 months ago

Walkthrough

The update to the codebase involves a crucial change to the file handling mechanism. Specifically, it ensures that any existing file is deleted before new data is written, which is a significant shift from the previous append or overwrite approach.

Changes

File Change Summary
.../oatmeal/FileRW.java Added Files.deleteIfExists(path) to clear the file before writing.

🍂 As autumn leaves do fall and sway,
🐇 A rabbit codes and clears the way.
With each file fresh, the slate wiped clean,
🎉 New beginnings in the code are seen.


Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - If you reply to a *review comment* from CodeRabbit, the bot will automatically respond. - To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment - Note: Review comments are made on code diffs or files, not on the PR overview. - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Note: For conversation with the bot, please use the review comments on code diffs or files. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - The JSON schema for the configuration file is available [here](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json). - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json`