numtide / treefmt-nix

treefmt nix configuration
https://numtide.github.io/treefmt/
MIT License
247 stars 75 forks source link

feat: add buildifier #37

Closed teto closed 1 year ago

teto commented 1 year ago

a bazel formatter

I've tried using this PR on a bazel project but I get:

[INFO]: Error using formatter #buildozer:
• [STDOUT]:

• [STDERR]:
/home/teto/nova/BUILD.bazel: error while executing commands [] on target /home/teto/nova/buildlib/default_extensions.bzl

I used to run buildozer -r ., how does treefmt run commands ? does it pass a list of them to the "command" or does it call the binary for each file ?

zimbatm commented 1 year ago

Do you mind taking a look at this doc and telling me if it answers your question? https://numtide.github.io/treefmt/formatters-spec.html I'm trying to make the docs better.

teto commented 1 year ago

turns out what I wanted was buildifier and not buildozer. That one is tested and works. ready for review

zimbatm commented 1 year ago

thanks! do you mind adding it to the README as well?

teto commented 1 year ago

sure. done.

zimbatm commented 1 year ago

bors merge

bors[bot] commented 1 year ago

Build succeeded: