Skip to content

RuboCop autocorrect aliases missed, rtk init --cursor in troubleshooting does not exist, Windows config path undocumented — plus what I could not verify and why #3429

Open

Description

@HetCreep

Closing out the audit with the items I could verify from source but not exercise end to end. Each one says exactly what I checked and what I did not, so you can weigh them accordingly rather than taking a uniform confidence from me.

Provenance: AI-assisted source audit, human-directed, at v0.44.2 (700bdde). Where an item says "source only", no tool was run — the reason is stated inline.

1. RuboCop autocorrect aliases are missed — SOURCE ONLY

src/cmds/ruby/rubocop_cmd.rs:56-58:

let is_autocorrect = args
    .iter()
    .any(|a| a == "-a" || a == "-A" || a == "--auto-correct" || a == "--auto-correct-all");

RuboCop also accepts --autocorrect, --autocorrect-all, -x (--fix-layout) — the hyphenless spellings are the ones its own docs use in current versions. Those miss this check, so has_format stays false and --format json is injected into a run that rewrites files (:63), routing it to the JSON filter.

There is a second-order effect visible in the struct: RubocopOffense (:28-34) has correctable but no corrected field, so offences that the same run just fixed are still counted as outstanding — which is what produces advice to re-run the autocorrect that already ran.

What I did not do: Ruby is not installed on the audit machine and I did not build a stand-in for rubocop specifically. So the flag list and the missing struct field are read from source; the user-visible output I described is inferred, not observed. If the hyphenless aliases are not actually accepted by the RuboCop versions you support, this is not a bug — I could not check that either.

2. rtk init --global --cursor does not exist

docs/guide/resources/troubleshooting.md:49 gives:

rtk init --global --cursor    # Cursor

rtk init --help lists these long flags:

--opencode --gemini --agent --show --claude-md --hook-only --auto-patch --no-patch
--trust-filters --no-trust-filters --uninstall --codex --copilot --dry-run
--ultra-compact --skip-env

There is no --cursor. Cursor is reachable only as --agent cursor. Note the inconsistency this documents: --codex, --copilot, --gemini and --opencode have bare flags; Cursor, Droid, Hermes, Pi, Windsurf, Cline, Kilo and Antigravity do not — so a user reasonably generalises from the four that exist.

3. Windows config path is not documented anywhere

docs/guide/getting-started/configuration.md:12-15 lists config-file locations for Linux and macOS only. README.md:346 says rtk "works fully on native Windows". On Windows the path is %APPDATA%\rtk\config.toml (from dirs::config_dir()) — observed as C:\Users\<user>\AppData\Roaming\rtk\config.toml. docs/guide/analytics/gain.md:125 has the same Linux/macOS-only listing for the database path.

A Windows user following the docs cannot find the file they are told to edit.

What I could not check at all, and why

Rather than leave these as silent gaps:

This is the same list as #3399, updated with what the later rounds added. The short version: claims about rtk's own code are checkable by reading; claims about how a wrapped tool behaves are not, and I have tried to keep those two labelled separately throughout.

Suggested fixes (untested)

  1. Add the hyphenless aliases and -x to is_autocorrect; add corrected to RubocopOffense and exclude corrected offences from the count.
  2. Correct troubleshooting.md:49 to --agent cursor, or add the bare --cursor flag for consistency with the other four.
  3. Add a Windows row to the config and database path tables.

Activity

  1. added
    bug
    good first issue
    on Aug 4, 2026
  2. pszymkowiak commented on Aug 4, 2026

    @pszymkowiak
    Collaborator

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟡 Priority medium
    🎯 Confidence 72%

    Summary

    RuboCop's hyphenless autocorrect flags (--autocorrect, --autocorrect-all, -x) aren't recognized so JSON output gets wrongly injected into rewriting runs, plus two docs gaps (--cursor doesn't exist, Windows config path undocumented); all findings are source-only, not run against real tools.

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

    📁 Relevant files
    • src/cmds/ruby/rubocop_cmd.rs
    • docs/guide/resources/troubleshooting.md
    • docs/guide/getting-started/configuration.md
    • docs/guide/analytics/gain.md

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

  3. added a commit that references this issue on Aug 12, 2026
    72362ae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:docsbuggood first issuepriority:medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions