buildtools icon indicating copy to clipboard operation
buildtools copied to clipboard

A bazel BUILD file formatter and editor

Results 185 buildtools issues
Sort by recently updated
recently updated
newest added

It seems as though the latest release, and master are missing the `buildifier_test` target when I add it as a target in my project using Bazel 4.1.0 on macOS 11.2.3...

e.g. we have `scala.bzl` containing ```bazel def my_scala_toolchain(name = "my_scala_toolchain"): ... ``` Buildifier complains about `unused-variable` for `name`, but removing it results in `unnamed-macro`. Currently, we have to add a...

Right now buildifier leaves single-item lists alone. That is, if it sees something like: ``` srcs = [ "foo", ], ``` or like: ``` srcs = ["foo"], ``` it will...

I have a use case where in Golang, we often use Gazelle to generate a bunch of `go_repository` target in a separate starlark file under a macro. Example: ``` #...

This adds windows support in an incredibly minimal and non intrusive way with zero additional maintenance burden.

Buildifier incorrectly considers the presence of `native.register_toolchains` to indicate that the function is a macro and therefore needs a `name` argument. `register_toolchains` is not a regular rule or macro itself...

`bazel run //:buildifier` automatically assumes you want to format all files in a repository: https://github.com/bazelbuild/buildtools/blob/master/buildifier/runner.bash.template#L21-L36 It would be nice if one could pass in a list of files to format...

Lots of places in the code still assume BUILD is the build file name, as such this is mainly useful to add additional build file names.

cla: yes

Suppose - a Bazel package already includes `package(default_visibility = [...])`, - a target in this package _does not_ specify the `visibility` attr, and - we are trying to grant visibility...

Make the meaning of "relative rule" explicit. Figuring this out with trial and error took me more time and effort than I'm proud of, and having had the option to...