rust-lang / rust-lang/rust-clippy

TESTNAME should be in CONTRIBUTING.md

Open
#9,825 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

TESTNAME is currently underdocumented. It is mentioned in the book but the book is very long and it explains stuff like how to use git and stuff. For me, as someone coming from rustc, who was accustomed to x.py test path/to/test working, TESTNAME was quite non-obvious. It's also not suggested when compiletest prints that a test has failed:

To only update this specific test, also pass `--test-args manual_let_else.rs`

If you try that flag you get:

$ cargo uitest --test-args manual_let_else.rs
error: Found argument '--test-args' which wasn't expected, or isn't valid in this context

And:

$ cargo uitest -- --test-args manual_let_else.rs
    Finished test [unoptimized + debuginfo] target(s) in 0.18s
     Running tests/compile-test.rs (target/debug/deps/compile_test-a3c7e3c02f9d451b)
error: Unrecognized option: 'test-args'
error: test failed, to rerun pass `--test compile-test`

In #8437 , I ended up running all tests each time which wasted a lot of time. I think a mention of TESTNAME definitely belongs into CONTRIBUTING.md.

cc https://github.com/rust-lang/rust/issues/104200

Contributor guide

Open the contributing guide

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.

Research direction

Start with CONTRIBUTING.md and its existing test-running instructions. Document how TESTNAME is used to run or update a specific test, taking the compiletest output and the cargo uitest examples in the issue as context. Done means a newcomer can find and use the focused-test workflow without running the full suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.