rust-lang / rust-lang/rust

tidy: rustdoc.d.js is allowed to have trailing whitespace

Open
#142,596 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-tidy C-bug T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Summary

This file is not checked for trailing whitespace by tidy, and eslint is set to ignore large portions of it.

Command used
# after intentionally adding trailing whitespace to `rustdoc.d.js` (make sure your editor isn't removing the whitespace automatically)
./x test tidy
Expected behaviour

Either tidy or eslint complains about the trailing whitespace.

Actual behaviour

No warning

Bootstrap configuration (bootstrap.toml)
profile = "tools"  # Includes one of the default files in src/bootstrap/defaults
change-id = 138986

rust.download-rustc = false
rust.deny-warnings = false
build.docs-minification = false
Operating system

Arch Linux

HEAD

8ce228758651aa58c4d34e3bd65bf70a251da27e

Additional context
Build Log

Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.03s
Building stage0 tool tidy (x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized] target(s) in 0.07s
fmt check
fmt: skipped untracked file 0001-scrape-examples.js-give-each-function-a-signature.patch
fmt: skipped untracked file 0002-rustdoc-js-add-ScrapedLoc-type.patch
fmt: skipped untracked file 0003-rustdoc-js-add-rustdoc.ScrapedLoc-type.patch
fmt: skipped untracked file perf.data
fmt: checked modified file library/core/src/ptr/const_ptr.rs
fmt: checked modified file library/core/src/ptr/mut_ptr.rs
tidy check
Running eslint on rustdoc JS files
x.py completions check
Build completed successfully in 0:00:06

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

Inspect the tidy check invoked by ./x test tidy and the eslint configuration affecting rustdoc.d.js. Add or adjust the relevant check so intentionally added trailing whitespace produces a warning, then rerun ./x test tidy to confirm the issue is detected.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, javascript, rust
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.