Skip to content
index.ocx.sh

Buildifier

latest 10.2.0_20261028

Formatter and linter for Bazel BUILD, WORKSPACE, and .bzl files — the standard code style for Bazel's Starlark dialect

Unaffiliated mirror. Buildifier is a project of the Bazel authors; this OCX package republishes upstream release binaries and is not endorsed by them. Upstream: github.com/bazel-contrib/buildtools/tree/main/buildifier ⁠ (opens in a new tab)

Versions · 70

click = copy identifier · right-click = more
(default)
69 more
+2
+2
+2
+2
+4
+8
+2
+6
+2
+4
+6
+4
+2
+4

README

Buildifier

Buildifier formats and lints Bazel BUILD, WORKSPACE, and .bzl files to a standard style, the way gofmt does for Go — anyone maintaining a Bazel workspace wants it in their pre-commit hook or CI so generated and hand-written BUILD files never drift apart.

It reads Starlark source (BUILD/BUILD.bazel, WORKSPACE, .bzl, MODULE.bazel) and either rewrites the file in place or reports a diagnostic, depending on the flags passed.

What's included

  • buildifier — the single static binary. No runtime dependencies.

Usage

buildifier -r .

Reformats every BUILD/WORKSPACE/.bzl file under the current directory in place. Run with --lint=warn to report style issues without rewriting, or --mode=check --format=json to fail a CI step non-destructively.

Buildifier ships from the same repository and release as buildozer and unused-deps — if you need one, the other two are one ocx add away.

Links

Apache-2.0 licensed.

Install

Platforms

Linux amd64arm64
macOS amd64arm64
Windows amd64arm64

Metadata

registry
revision
33999342326a5a8a13ff6cbc81388812136cba1d
owners
@ocx-bot
latest
10.2.0_20261028
tags
70