Skip to content

After #4768: pest, rspec and rubocop look for their options past a restored --, so rtk stops injecting its format #4920

Open

Description

@KuSh

Once #4768 restores a leading --, several modules still look for their own options in the arguments after it. A word after the separator then turns off the option rtk injects, though the tool reads that word as a path, not an option.

argv a stub on PATH records (develop 4b4bc40 with #4768 merged):

command forwarded what is lost
rtk pest -- --no-progress -- --no-progress rtk's --no-progress (has_no_progress, pest_cmd.rs:12)
rtk rubocop -- -foo.rb -- -foo.rb --format json, so the text filter runs (has_format, rubocop_cmd.rs:61)
rtk rspec -- -f.rb -- -f.rb --format json (has_format, rspec_cmd.rs:75)

The tool still gets exactly what the user typed; what changes is that rtk's structured output is no longer requested, so the run goes through the text path or passes through unfiltered.

Related: with the separator restored, rtk go -- tool golangci-lint run reaches GoCommands::Other as [--, tool, …], so the go tool golangci-lint interception (match_go_tool, which reads args.first()) no longer applies and the run is unfiltered; its tracking label takes -- as the subcommand (go_cmd.rs:158).

Direction: read these options with arg_tokenizer up to the -- boundary (before_dashdash / injection_point), as #4768 does for the jest and vitest skip filters.

Activity

  1. rtk-wshm-sync-bot commented on Nov 1, 2026

    @rtk-wshm-sync-bot

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟠 Priority high
    🎯 Confidence 90%

    Summary

    After #4768 restored a leading --, pest/rspec/rubocop/go-tool option-sniffing still scans past it, so rtk's injected flags and the golangci-lint interception silently stop firing — fix by reading options up to the -- boundary via arg_tokenizer.

    This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.

    📁 Relevant files
    • pest_cmd.rs
    • rubocop_cmd.rs
    • rspec_cmd.rs
    • go_cmd.rs

    Suggested Actions

    1. Bound option-sniffing in pest_cmd.rs:12, rubocop_cmd.rs:61, rspec_cmd.rs:75 to before --, per fix(cli): restore a leading -- for 14 passthrough commands #4768's jest/vitest pat…
    2. Fix match_go_tool in go_cmd.rs:158 to use before_dashdash so go -- tool golangci-lint run is still intercepted
    3. Cross-check against A leading -- is still dropped for mvnd, oc, sbt, gt, bun, deno, docker compose, go test/build/vet and kubectl get #4919 (leading -- still dropped elsewhere) since both stem from fix(cli): restore a leading -- for 14 passthrough commands #4768's -- handling

    Triaged automatically by wshm · This is an automated analysis, not a human review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions