You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+ Reject unused arguments for `features` and `tweaks`+ Reject unknown option flags for `clean`+ Explain when `--keep` is missing its feature names
These changes address the ignored-argument cases in #58.
Evidence
Before: On macOS 26.6.2 (25G83), features extra and tweaks bogus exited 0. clean --bogus --dry-run reported that --bogus was not in the cleanable list, and off --keep reported unknown option --keep.
After: All four commands exit non-zero with the relevant argument or option error.
Build: Debug and release builds passed with Swift 6.3.3; the release removemacai selftest passed all 85 checks. The CLI cases were run in an isolated macOS sandbox with networking disabled.
Merge Danger
Door: Two-way
Blast Radius: CLI argument validation. Extra arguments and unknown option flags now fail explicitly instead of being ignored or treated as names.
Summary by CodeRabbit
Bug Fixes
Improved command-line validation: commands now reject unexpected arguments, and options report an error when their value is missing or looks like another option.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 8f12f381-e255-4ff7-ad25-9009cc2f7e72
📥 Commits
Reviewing files that changed from the base of the PR and between 4af72aa and 5d2479d.
📒 Files selected for processing: 1
Sources/removemacai/main.swift
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
📝 Walkthrough
The CLI now reports missing option values and rejects unexpected arguments in the features, tweaks, and clean commands.
option(_:) reports an error when an option has no value or its next argument begins with -. The features and tweaks commands reject remaining arguments. The clean command rejects remaining arguments that begin with -.
The empty --keep case remains a follow-up, not a regression from this PR. No actionable merge risk was identified in the reviewed changes.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title, "Reject unused CLI arguments," clearly and concisely describes the pull request's primary change: rejecting unused and invalid command-line arguments.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
i went through all four cases from #58 and each one exits with an error now 🙌
the --keep message is nicer than what i had in mind too
i'm merging it for 1.1.4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
These changes address the ignored-argument cases in #58.
Evidence
features extraandtweaks bogusexited 0.clean --bogus --dry-runreported that--boguswas not in the cleanable list, andoff --keepreportedunknown option --keep.removemacai selftestpassed all 85 checks. The CLI cases were run in an isolated macOS sandbox with networking disabled.Merge Danger
Door: Two-way
Blast Radius: CLI argument validation. Extra arguments and unknown option flags now fail explicitly instead of being ignored or treated as names.
Summary by CodeRabbit