rust_analyzer flycheck: no CLI way to enable clippy from `check.overrideCommand`

Closed Beginner friendly
#4,392 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

  • #4393 by @TrapsterDK — closed without merging

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
77/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
tooling

Research direction

Start with tools/rust_analyzer/bin/flycheck.rs; inspect how Args parses --output-base and how user_config.json currently supplies the clippy setting. Add CLI options that override that setting, then check the existing flycheck tests or add coverage for both flags and the config fallback. Done means overrideCommand can enable or disable clippy without writing user_config.json.

Written by the indexing model from the issue text.

Description

needs-triage

tools/rust_analyzer/bin/flycheck.rs adds the clippy aspect only when <launcher_dir>/user_config.json has "clippy": true. There is no flag or env var for it.

Editors that call flycheck through rust-analyzer.check.overrideCommand (override mode, --saved-file $saved_file) can't turn clippy on from their own settings. The only way is to write user_config.json next to the flycheck binary. Tools that copy flycheck somewhere else have to write that file too.

Proposal: add --clippy / --no-clippy to flycheck's Args. They override user_config.json the same way --output-base already overrides output_base. The discover runnable stays the same for every user; the flags are meant for overrideCommand, where the settings are per user already.

Assisted by Claude.

Dominant language
Starlark
Stars
854
Forks
684
Avg merge
2d 22h
Merged PRs (30d)
21

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bazelbuild/rules_rust

All issues in bazelbuild/rules_rust

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.