Skip to content

Commit

Permalink
Unrolled build for rust-lang#135478
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#135478 - Kobzol:gcc-clippy, r=onur-ozkan

Run clippy for rustc_codegen_gcc on CI

Requested on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Run.20clippy.20for.20rustc_codegen_gcc.20in.20the.20Rust.20CI).

Opening as a draft, since it's not clear which rules should be applied to it.

r? `@ghost`
  • Loading branch information
rust-timer authored Jan 18, 2025
2 parents efc2576 + 6ad9c1d commit a41c55a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/bootstrap/src/core/build_steps/clippy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ lint_any!(
CargoMiri, "src/tools/miri/cargo-miri", "cargo-miri";
Clippy, "src/tools/clippy", "clippy";
CollectLicenseMetadata, "src/tools/collect-license-metadata", "collect-license-metadata";
CodegenGcc, "compiler/rustc_codegen_gcc", "rustc-codegen-gcc";
Compiletest, "src/tools/compiletest", "compiletest";
CoverageDump, "src/tools/coverage-dump", "coverage-dump";
Jsondocck, "src/tools/jsondocck", "jsondocck";
Expand Down Expand Up @@ -400,6 +401,12 @@ impl Step for CI {
],
forbid: vec![],
};
builder.ensure(Std {
target: self.target,
config: self.config.merge(&library_clippy_cfg),
crates: vec![],
});

let compiler_clippy_cfg = LintConfig {
allow: vec!["clippy::all".into()],
warn: vec![],
Expand All @@ -419,16 +426,21 @@ impl Step for CI {
],
forbid: vec![],
};

builder.ensure(Std {
target: self.target,
config: self.config.merge(&library_clippy_cfg),
crates: vec![],
});
builder.ensure(Rustc {
target: self.target,
config: self.config.merge(&compiler_clippy_cfg),
crates: vec![],
});

let rustc_codegen_gcc = LintConfig {
allow: vec![],
warn: vec![],
deny: vec!["warnings".into()],
forbid: vec![],
};
builder.ensure(CodegenGcc {
target: self.target,
config: self.config.merge(&rustc_codegen_gcc),
});
}
}
1 change: 1 addition & 0 deletions src/bootstrap/src/core/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,7 @@ impl<'a> Builder<'a> {
clippy::BuildManifest,
clippy::CargoMiri,
clippy::Clippy,
clippy::CodegenGcc,
clippy::CollectLicenseMetadata,
clippy::Compiletest,
clippy::CoverageDump,
Expand Down

0 comments on commit a41c55a

Please sign in to comment.