Created by: bolinfest
I created a small fork of https://github.com/bazelbuild/buildifier at https://github.com/bolinfest/buildifier/tree/buck. The notable changes are:
- Use single quotes instead of double quotes.
- Use 2-space indents instead of 4-space indents.
I built my fork as per the instructions:
bazel build //buildifier
I copied the output to my local Buck repo:
cp ~/code/buildifier/bazel-bin/buildifier/buildifier buildifier
And then I ran it on Buck itself:
./buildifier -showlog -mode=fix -buildifier_disable=label $(find . -name BUCK -type f)
The results of running buildifier
can be seen in this commit.
Note that it emitted two warnings when I ran it:
./test/com/facebook/buck/apple/BUCK:1:28: syntax error near :
./src/com/facebook/buck/apple/BUCK:1:28: syntax error near :
I believe this has to do with our unconventional use of with
in those
build files:
with allow_unsafe_import():
from sys import platform as os_platform