From 38c90bc4cfe64d4316eb2a64f14e05b74d308cf0 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Tue, 28 Feb 2017 18:10:37 +0900 Subject: [PATCH] dev-contributing: Document usage of buildifer tool Update the style section to mention that BUILD and WORKSPACE files are formatted with the buildifier tool. Change-Id: I493b5caab4c620e538b59a9363c23afc76fc68db --- Documentation/dev-contributing.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Documentation/dev-contributing.txt b/Documentation/dev-contributing.txt index 435e316db5..823424e54d 100644 --- a/Documentation/dev-contributing.txt +++ b/Documentation/dev-contributing.txt @@ -151,12 +151,13 @@ Gerrit generally follows the link:https://google.github.io/styleguide/javaguide.html[Google Java Style Guide]. -To format source code, Gerrit uses the +To format Java source code, Gerrit uses the link:https://github.com/google/google-java-format[`google-java-format`] -tool (version 1.3), which automatically formats code to follow the -style guide. Using this tool streamlines code review by reducing the -need for time-consuming, tedious, and contentious discussions about -trivial issues like whitespace. +tool (version 1.3), and to format Bazel BUILD and WORKSPACE files the +link:https://github.com/bazelbuild/buildifier[`buildifier`] tool. These +tools automatically apply format according to the style guides; this +streamlines code review by reducing the need for time-consuming, tedious, +and contentious discussions about trivial issues like whitespace. You may download and run `google-java-format` on your own, or you may run `./tools/setup_gjf.sh` to download a local copy and set up a