Update README (#3)

1 file changed
tree: f8598faac1b7dd931984848a164abd3d4034e37e
  1. .gitignore
  2. BUILD
  3. defs.bzl
  4. LICENSE
  5. README.md
  6. rules.bzl
  7. runner.bash.template
  8. toolchain.bzl
  9. WORKSPACE
README.md

buildifier-prebuilt

This repo contains bazel rules for buildifier and buildozer using prebuilt binaries with bazel toolchains instead of requiring you depend on rules_go. This also means you won‘t download every possible version of these binaries, you’ll only download the ones for the platform you're running on.

Usage

You can create a rule for running buildifier:

load("@buildifier_prebuilt//:rules.bzl", "buildifier")

buildifier(
    name = "buildifier.check",
    exclude_patterns = [
        "./.git/*",
    ],
    lint_mode = "warn",
    mode = "diff",
)

That can be run with:

bazel run //:buildifier.check

Or you can run buildifier or buildozer directly:

bazel run -- @buildifier_prebuilt//:buildozer ARGS
bazel run -- @buildifier_prebuilt//:buildifier ARGS

Installation

Checkout the releases page for snippets for your WORKSPACE