feat: configurable external checks via -- passthrough and verifyx eject#10
Merged
Merged
Conversation
Give external checks (skott, oxlint, etc.) two escape hatches for when their default invocation needs tweaking: - Passthrough: `verifyx circular-deps -- src/*.ts` forwards everything after `--` verbatim to the underlying tool (globs left unquoted so the shell still expands them). `verifyx init` scaffolds circular-deps as `verifyx circular-deps -- src/*.ts` so skott's required target is visible and editable in package.json. - `verifyx eject <check>`: replaces the CLI wrapper script with the raw tool command so a consumer can own it -- e.g. verify:lint -> `oxlint .` and verify:lint:fix -> `oxlint --fix .`, verify:circular-deps -> the raw skott command. Fixable checks get both the base and :fix scripts (the fix-locally/check-in-CI pairing verifyx already understands). Native checks refuse to eject (no shell command to hand over). Adds RunDefaultOptions.extraArgs, Check.eject, the appendArgs helper, scaffoldArgs on the external spec, setScripts, and the eject command + applyEject/ejectScripts programmatic API, with tests. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
What & why
skott(and other external tools) sometimes need their invocation tweaked, but every external check was hard-wired to a single command with no way to adjust it short of dropping the built-in entirely. This adds two escape hatches so you can configure an external tool without losing theverifyxwrapper's benefits.Changes
1.
--passthrough to the underlying toolAnything after
--on an external check is forwarded verbatim to the tool:Args are appended unquoted so shell globs still expand. Works for every external check, not just skott.
verifyx initnow scaffoldsverify:circular-depsasverifyx circular-deps -- src/*.ts, so skott's required target is visible and editable inpackage.json.2.
verifyx eject <check>Replaces the CLI wrapper script with the raw tool command so you can own the invocation:
Fixable checks (
lint,format) get both the base and:fixscripts — the fix-locally/check-in-CI pairingverifyxalready understands. Ejecting overwritesverify:<name>(that's the point) and leaves other scripts untouched. Native checks refuse to eject (they run in-process and have no shell command to hand over).Implementation notes
RunDefaultOptions.extraArgs,Check.eject, and theappendArgshelper (external.ts)scaffoldArgson the external check spec;scaffoldArgs: 'src/*.ts'on circular-depssetScripts(overwriting) in packageScripts.ts; newejectcommand +applyEject/ejectScriptsprogrammatic APIverifyx ejectsection, API exports)Design decision worth a look
src/*.tslives only in the scaffolded script, matching the request literally:verifyx eject circular-depsyields bareskott …(no target), andverifyx all's built-in circular-deps also runs skott target-less (unchanged). If we'd rather bake the target in everywhere, it's a one-line change.Testing
src/scaffold/eject.test.ts; extendedexternal.test.tsandregistry.test.tsnpm run verifygreen🤖 Generated with Claude Code