refactor: use oclif variadic args instead of strict=false#782
Draft
refactor: use oclif variadic args instead of strict=false#782
Conversation
Replace `strict = false` + manual argv parsing with `multiple: true` on Args.string() in doctor, documents delete, and install commands. This uses oclif's built-in variadic argument support (added in @oclif/core 4.10.0) for proper parsing, validation, and help output. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @rexxars's task in 49s —— View job Review
The Replace the filter with a type assertion: // before
return checkNames.filter((name) => isDoctorCheckName(name)).map((check) => doctorChecks[check])
// after
return (checkNames as DoctorCheckName[]).map((check) => doctorChecks[check])And remove the now-unused |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Coverage Delta
Comparing 3 changed files against main @ Overall Coverage
|
The simulateOAuthCallback helper used a single 100ms delay before connecting to the local auth server. On Windows CI, the server may not be listening yet, causing ECONNREFUSED. Add retry logic with backoff and use 127.0.0.1 directly to avoid IPv6 resolution delays. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
strict = false+ manualargvparsing with oclif's nativemultiple: trueonArgs.string()indoctor,documents delete, andinstallcommandsdoctorcommand's check names viaoptions: [...]instead of manual validationexecremainsstrict = falsesince it's a genuine passthrough caseTest plan
doctorcommand validates check names via oclif'soptions(error message changed from custom to oclif'sExpected X to be one of...)sanity doctor cli studio,sanity documents delete id1 id2,sanity install pkg1 pkg2🤖 Generated with Claude Code