From 0354561d8e4480ef224f9dcd0b5aef1e20aae9a5 Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Tue, 4 Aug 2026 14:21:01 -0700 Subject: [PATCH] Ignore existing buildifier configs for crate_universe vendoring --- crate_universe/src/cli/vendor.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crate_universe/src/cli/vendor.rs b/crate_universe/src/cli/vendor.rs index 539550db5e..1a47e5828c 100644 --- a/crate_universe/src/cli/vendor.rs +++ b/crate_universe/src/cli/vendor.rs @@ -94,10 +94,12 @@ pub struct VendorOptions { /// the file to disk before formatting. The `path` argument is passed as /// `--path` so buildifier can infer the file type (BUILD vs .bzl). /// -/// See . +/// `-config=off` disables buildifier's config discovery so the consuming +/// repo's `.buildifier.json` (and any `BUILDIFIER_CONFIG` env var) does not +/// apply lint policy to auto-generated vendored files. fn buildifier_format(bin: &Path, content: &str, path: &Path) -> anyhow::Result { let mut child = process::Command::new(bin) - .args(["-lint=fix", "-mode=fix", "-warnings=all"]) + .args(["-lint=fix", "-mode=fix", "-warnings=all", "-config=off"]) .arg(format!("--path={}", path.display())) .stdin(process::Stdio::piped()) .stdout(process::Stdio::piped())