mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 16:15:03 +00:00
create Builder::msg_clippy
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
81b7944163
commit
8a865a0fa9
@ -134,16 +134,11 @@ impl Step for Std {
|
||||
|
||||
std_cargo(builder, target, compiler.stage, &mut cargo);
|
||||
|
||||
if matches!(builder.config.cmd, Subcommand::Fix { .. }) {
|
||||
// By default, cargo tries to fix all targets. Tell it not to fix tests until we've added `test` to the sysroot.
|
||||
cargo.arg("--lib");
|
||||
}
|
||||
|
||||
for krate in &*self.crates {
|
||||
cargo.arg("-p").arg(krate);
|
||||
}
|
||||
|
||||
let _guard = builder.msg_check(
|
||||
let _guard = builder.msg_clippy(
|
||||
format_args!("library artifacts{}", crate_description(&self.crates)),
|
||||
target,
|
||||
);
|
||||
@ -213,13 +208,13 @@ impl Step for Rustc {
|
||||
rustc_cargo(builder, &mut cargo, target, compiler.stage);
|
||||
|
||||
// Explicitly pass -p for all compiler crates -- this will force cargo
|
||||
// to also check the tests/benches/examples for these crates, rather
|
||||
// to also lint the tests/benches/examples for these crates, rather
|
||||
// than just the leaf crate.
|
||||
for krate in &*self.crates {
|
||||
cargo.arg("-p").arg(krate);
|
||||
}
|
||||
|
||||
let _guard = builder.msg_check(
|
||||
let _guard = builder.msg_clippy(
|
||||
format_args!("compiler artifacts{}", crate_description(&self.crates)),
|
||||
target,
|
||||
);
|
||||
|
@ -13,9 +13,9 @@ use std::process::Command;
|
||||
use std::sync::OnceLock;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use crate::core::build_steps::{clippy, llvm};
|
||||
use crate::core::build_steps::tool::{self, SourceType};
|
||||
use crate::core::build_steps::{check, clean, compile, dist, doc, install, run, setup, test};
|
||||
use crate::core::build_steps::{clippy, llvm};
|
||||
use crate::core::config::flags::{Color, Subcommand};
|
||||
use crate::core::config::{DryRun, SplitDebuginfo, TargetSelection};
|
||||
use crate::prepare_behaviour_dump_dir;
|
||||
@ -672,6 +672,7 @@ impl Kind {
|
||||
Kind::Doc => "Documenting",
|
||||
Kind::Run => "Running",
|
||||
Kind::Suggest => "Suggesting",
|
||||
Kind::Clippy => "Linting",
|
||||
_ => {
|
||||
let title_letter = self.as_str()[0..1].to_ascii_uppercase();
|
||||
return format!("{title_letter}{}ing", &self.as_str()[1..]);
|
||||
|
@ -1078,6 +1078,16 @@ impl Build {
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use = "Groups should not be dropped until the Step finishes running"]
|
||||
#[track_caller]
|
||||
fn msg_clippy(
|
||||
&self,
|
||||
what: impl Display,
|
||||
target: impl Into<Option<TargetSelection>>,
|
||||
) -> Option<gha::Group> {
|
||||
self.msg(Kind::Clippy, self.config.stage, what, self.config.build, target)
|
||||
}
|
||||
|
||||
#[must_use = "Groups should not be dropped until the Step finishes running"]
|
||||
#[track_caller]
|
||||
fn msg_check(
|
||||
|
Loading…
Reference in New Issue
Block a user