Skip to content

Conversation

@DropSnorz
Copy link
Owner

Resolve #384

@coderabbitai
Copy link

coderabbitai bot commented Oct 20, 2025

Walkthrough

The PR fixes a parsing bug where REAPER project filenames containing spaces are incorrectly extracted. The parser now strips surrounding quotes from the filename field during extraction. Test resources are updated with test cases containing spaces in filenames, and assertions validate correct parsing.

Changes

Cohort / File(s) Summary
Production parser update
owlplug-parsers/src/main/java/com/owlplug/parsers/reaper/PluginNodeListener.java
Modified filename extraction (second positional parameter) to strip surrounding quotes via replaceAll("\"", "") when at least two values are present, fixing parsing of filenames with spaces.
Test assertions
owlplug-parsers/src/test/java/com/owlplug/parsers/reaper/ReaperProjectGrammarTest.java
Extended test assertions to validate parsed filename fields, including cases with spaces: Tunefish4.vst3, Dexed_x64-with space.dll, reacomp.dll, reasynth.dll.
Test resources
owlplug-parsers/src/test/resources/reaper/reaper7.rpp, owlplug-parsers/src/test/resources/reaper/simpleReaperFile.rpp
Updated test data to include filenames with spaces enclosed in quotes (e.g., "Dexed_x64-with space.dll") to validate parsing of quoted filenames.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "Remove quotes in parsed reaper plugin name" directly and clearly summarizes the main code change. The raw summary confirms that the primary modification in PluginNodeListener.java adds quote-stripping logic via replaceAll("\\"", "") when extracting the filename parameter. This matches the stated objective from issue #384 of handling plugin names with spaces that are enclosed in quotes. The title is concise, specific, and accurately conveys what was changed without unnecessary details.
Linked Issues Check ✅ Passed The code changes directly address the primary objective from issue #384. The modification to PluginNodeListener.java strips surrounding quotes from parsed filenames using replaceAll("\\"", ""), which resolves the reported problem where filenames like "FabFilter Pro-Q 3.dll" were incorrectly parsed as "FabFilter Pro-Q 3 with a leading quote. The test updates validate this fix by asserting that filenames with spaces such as "Dexed_x64-with space.dll" are now parsed correctly without stray quotes. Test resources have been updated to include realistic test cases with spaces in filenames, further confirming the fix addresses the stated issue.
Out of Scope Changes Check ✅ Passed All changes in this pull request are directly related to resolving the quote-parsing issue in Reaper plugin filenames. The modifications include the core parser logic in PluginNodeListener.java to strip quotes, corresponding test assertions in ReaperProjectGrammarTest.java to validate the fix, and test resource files (reaper7.rpp and simpleReaperFile.rpp) updated with test cases containing spaces to exercise the fix. No unrelated refactoring, bug fixes to other systems, or feature additions outside the scope of the linked issue are present. All changes serve the singular purpose of fixing the quoted filename parsing problem.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/reaper-parser-quote

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@DropSnorz
Copy link
Owner Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Oct 20, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a 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

🧹 Nitpick comments (1)
owlplug-parsers/src/main/java/com/owlplug/parsers/reaper/PluginNodeListener.java (1)

58-61: Fix correctly resolves issue #384.

The quote-stripping logic now applies to the filename field, matching the existing approach used for the name field (line 56). This resolves the parsing issue where filenames with spaces (which must be quoted in .rpp files) were incorrectly parsed with leading quotes.

Consider stripping only surrounding quotes for precision.

The current replaceAll("\"", "") removes ALL quote characters from the string, including any that might appear in the middle of a filename. While this is consistent with the name field handling and quotes in filenames are rare (often disallowed), a more precise approach would strip only surrounding quotes:

-      plugin.setFilename(ctx.value(1).getText().replaceAll("\"", ""));
+      String filename = ctx.value(1).getText();
+      if (filename.startsWith("\"") && filename.endsWith("\"") && filename.length() > 1) {
+        filename = filename.substring(1, filename.length() - 1);
+      }
+      plugin.setFilename(filename);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4ed4d33 and 1f5f617.

📒 Files selected for processing (4)
  • owlplug-parsers/src/main/java/com/owlplug/parsers/reaper/PluginNodeListener.java (1 hunks)
  • owlplug-parsers/src/test/java/com/owlplug/parsers/reaper/ReaperProjectGrammarTest.java (2 hunks)
  • owlplug-parsers/src/test/resources/reaper/reaper7.rpp (1 hunks)
  • owlplug-parsers/src/test/resources/reaper/simpleReaperFile.rpp (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (5)
owlplug-parsers/src/test/resources/reaper/simpleReaperFile.rpp (1)

6-6: Good test case addition.

The updated ATTRIBUTE line now includes both quoted and unquoted values, plus a value with spaces ("test with spaces"), which provides better coverage for the quote-stripping logic.

owlplug-parsers/src/test/resources/reaper/reaper7.rpp (1)

205-205: Excellent test case for the reported issue.

The updated filename "Dexed_x64-with space.dll" directly reproduces the issue #384 scenario where plugin names with spaces are enclosed in quotes in .rpp files. This validates the quote-stripping fix.

owlplug-parsers/src/test/java/com/owlplug/parsers/reaper/ReaperProjectGrammarTest.java (2)

73-75: Comprehensive test coverage for the fix.

The new filename assertions validate both simple filenames (line 73) and filenames with spaces (line 75). The assertion on line 75 specifically tests the fix for issue #384, confirming that "Dexed_x64-with space.dll" (quoted in the .rpp file) is correctly parsed as Dexed_x64-with space.dll (without quotes).


99-101: Good test validation for additional files.

The filename assertions for the advanced reaper file ensure the fix works consistently across different test resources.

owlplug-parsers/src/main/java/com/owlplug/parsers/reaper/PluginNodeListener.java (1)

62-65: The review comment's concern is unfounded—the code is correct as-is.

Verification confirms that rawId values in .rpp files are not quoted (e.g., 2117771985{5653545466733474756E656669736834}, 1147500644<56535444657864646578656400000000>). The code correctly does not strip quotes from rawId because there are no quotes to strip. Unlike name and filename fields which are quoted in the format, rawId values are bare composite identifiers or numbers. The implementation is consistent with the actual .rpp file format.

Likely an incorrect or invalid review comment.

@DropSnorz DropSnorz self-assigned this Oct 20, 2025
@DropSnorz DropSnorz merged commit 7825845 into master Oct 20, 2025
3 checks passed
@DropSnorz DropSnorz moved this to Done in OwlPlug 1.31 Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Plugin names with spaces in Reaper projects are parsed incorrectly

2 participants