Skip to content

Rename the tidy binary to rust-tidy #82507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl Step for ToolBuild {
fn run(self, builder: &Builder<'_>) -> Option<PathBuf> {
let compiler = self.compiler;
let target = self.target;
let tool = self.tool;
let mut tool = self.tool;
let path = self.path;
let is_optional_tool = self.is_optional_tool;

Expand Down Expand Up @@ -208,6 +208,12 @@ impl Step for ToolBuild {
None
}
} else {
// HACK(#82501): on Windows, the tools directory gets added to PATH when running tests, and
// compiletest confuses HTML tidy with the in-tree tidy. Name the in-tree tidy something
// different so the problem doesn't come up.
if tool == "tidy" {
tool = "rust-tidy";
}
let cargo_out =
builder.cargo_out(compiler, self.mode, target).join(exe(tool, compiler.host));
let bin = builder.tools_dir(compiler).join(exe(tool, compiler.host));
Expand Down
5 changes: 5 additions & 0 deletions src/tools/tidy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ name = "tidy"
version = "0.1.0"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
edition = "2018"
autobins = false

[dependencies]
cargo_metadata = "0.11"
regex = "1"
lazy_static = "1"
walkdir = "2"

[[bin]]
name = "rust-tidy"
path = "src/main.rs"