From 9819b1bf9963965b61ff6b9c30ed5ec76346e7ab Mon Sep 17 00:00:00 2001 From: "thakis@chromium.org" Date: Tue, 9 Dec 2014 21:21:53 +0000 Subject: [PATCH] Let `git cl format` format java files, too. This will only have an effect if one's buildtools checkout is new enough, since only then: a) clang-format will be new enough to do a decent job for java files b) clang-format-diff.py will be new enough to look at java files So for older buildtools checkouts, `git cl format` will continue to ignore java files. For newer buildtools checkouts (like the one pulled by `gclient sync` with a recent chromium checkout), it'll work and do a fairly decent job. BUG=429372 Review URL: https://codereview.chromium.org/788933003 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293312 0039d316-1c4b-4281-b951-d872f2087c98 --- git_cl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git_cl.py b/git_cl.py index d9b80aa70..778c46877 100755 --- a/git_cl.py +++ b/git_cl.py @@ -2769,7 +2769,7 @@ def CMDowners(parser, args): @subcommand.usage('[files or directories to diff]') def CMDformat(parser, args): """Runs clang-format on the diff.""" - CLANG_EXTS = ['.cc', '.cpp', '.h', '.mm', '.proto'] + CLANG_EXTS = ['.cc', '.cpp', '.h', '.mm', '.proto', '.java'] parser.add_option('--full', action='store_true', help='Reformat the full content of all touched files') parser.add_option('--dry-run', action='store_true',