Return non zero code, if check mode failed (#115) Fixes: #110. The point of check mode is to be able to verify the formatting of BUILD files from the CI: $ buildifier -mode=check $(find . -name BUILD) Choose the next free return value 4, and return it in case, reformat is needed.
buildifier is a tool for formatting bazel BUILD files with a standard convention.
| linux-x86_64 | ubuntu_15.10-x86_64 | darwin-x86_64 |
|---|---|---|
Build the tool:
go install or bazel build //buildifiergo get github.com/bazelbuild/buildtools/buildifier
Use buildifier to create standardized formatting for BUILD files in the same way that clang-format is used for source files.
$ buildifier -showlog -mode=check $(find . -iname BUILD -type f)