macOS
brew install buildifierlocal Homebrew formula metadata
安装
brew install buildifierlocal Homebrew formula metadata
nix profile install nixpkgs#buildifiernixpkgs package indexes · buildifier · 来源: raw.githubusercontent.com
概览
Format bazel BUILD files with a standard convention
历史
Buildifier is the Bazel ecosystem's standard formatter and linter for BUILD, WORKSPACE, MODULE.bazel, `.bzl`, and other Starlark-related files.
Buildifier is part of the bazelbuild/buildtools repository, which collects developer tools for working with Google's Bazel build tool. The repository also includes related tools such as Buildozer and unused_deps.
Its role is deliberately analogous to source-code formatters such as clang-format: it gives Bazel and Starlark files a standard convention and can also report or fix lint warnings.
Buildifier became common wherever Bazel is used seriously because BUILD and `.bzl` files are code-like inputs that benefit from deterministic formatting in review and CI. The tool is packaged by Homebrew and Nix according to the input and can also be installed with Go or run through Bazel rules.
Its adoption is tied directly to Bazel's adoption: monorepos and polyglot builds that standardize on Bazel often add Buildifier to presubmit checks so build metadata stays consistent.
Basic usage is `buildifier path/to/file`; recursive formatting uses `buildifier -r path/to/dir`. The README documents file-type detection for BUILD, WORKSPACE, `.bzl`, MODULE, and default Starlark files, with `--type` overrides for stdin or unusual filenames.
The integrated linter runs with `--lint=warn` or `--lint=fix`, and machine-readable diagnostics are available with JSON output in check mode.
Buildifier is significant because it formats package/build metadata rather than application source. For Bazel users, BUILD files are the package graph, so a stable formatter lowers merge noise and makes automated rewrites safer.
It also sits beside Buildozer: Buildifier normalizes and checks files, while Buildozer edits them programmatically, together forming a small maintenance toolkit for large Bazel workspaces.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
buildifier | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/bazelbuild/buildtools
安装元数据
| 软件包键 | brew:buildifier |
|---|---|
| 版本 | 8.5.1 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/buildifier |
| 主页 | https://github.com/bazelbuild/buildtools |
| 仓库 | https://github.com/bazelbuild/buildtools |
| 上游文档 | https://github.com/bazelbuild/buildtools/blob/main/buildifier/README.md |
| 许可证 | Apache-2.0 |
| 源码归档 | https://github.com/bazelbuild/buildtools/archive/refs/tags/v8.5.1.tar.gz |
| 构建依赖 | go |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | buildifier |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
buildifier
nix profile install nixpkgs#buildifier来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.