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

The current `buildozer` syntax for `dict_add` and `dict_set` requires users to pass in colon-delimited strings do distinguish between keys and values. Unfortunately, at least one use case, the `label_keyed_string_dict` attribute,...

At the time being substitute command works only if the value assigned to an attribute is `build.StringExpr` (or List). For example, given: ```shell cd $(mktemp -d /tmp/XXXX) touch WORKSPACE cat

This PR adds Windows support to call `bazel run //:buildifier` without needing msys2 workarounds by adding a native `.bat` file. This should address issues that have been opened a while...

cla: yes

The `-r` option is very nice and helpful. Thanks! In my workspace, I have a bazel managed directory `node_modules` that contains some .bzl files. (This directory contains 3rd party artifacts...

I don't want buildozer to reformat my code. If I want that I can run buildifier separately. Maybe `-buildifier=disable`? Specific case: I have attribute lines like: ``` opts = [...

When a `load` statement is put to the top with `buildifier --lint=fix --warnings=load-on-top`, the statement is added to the end of the loads. This means the statement is not placed...

Suppose we want to programmatically edit a top-level variable in a BUILD or bzl file. For example, maybe we want to add a new entry to a list constant in...

We've found this pattern in user code in Bazel: ```python if foo in native.existing_rules(): ``` It should be replaced with the much more efficient: ```python if native.existing_rule(foo): ``` (also with...

[Chocolatey](https://chocolatey.org/) is a package manager for windows. It'd be incredibly beneficial to be able to download things like `buildifier` via chocolatey. Could some kind soul set this up? 🙏

Buildifier tends to suggest a dependency on a target that is later exported by something else and so has limited visibility. eg. in this example, buildifier should suggest rules depend...