compiletest: warn if we see a `// @<directive-name>`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Realized in https://github.com/rust-lang/rust/pull/125808#discussion_r1622294753.
A test writer might accidentally write
// @ignore-cross-compile
which is parsed as a normal comment not a compiletest directive because compiletest directives require that the line starts with //@.
This typo is hard to spot: both by PR authors and the reviewers. It might not fail in PR CI -- it might not even fail in full build CI, but then explode when the conditions are just right.
We should detect these and issue at least warnings from compiletest to help test writers realize the problem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating compiletest's directive parser and how it reports diagnostics. Add coverage for lines using // @<directive-name> and verify that compiletest warns for the typo while valid //@ directives continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing-qa, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100