mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 02:31:29 +00:00
google_java_format.py is a simple wrapper script that finds and executes the google-java-format binary from Chromium tree. This CL moves the corresponding function from git_cl.py so that the logic can be executed without git_cl.py. This is the same strcture used in git_cl.py for running other language formatters. - clang_format.py - swift_format.py - rustfmt.py - gn.py With this patch, google-java-format can be used to run to formatter a java file in a chromium tree that is located in a non git checkout. Change-Id: I5f1b845040b28c0a8f15dd2e7c48c83ce2d9df97 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5525851 Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Scott Lee <ddoman@chromium.org>
13 lines
422 B
Batchfile
13 lines
422 B
Batchfile
@echo off
|
|
:: Copyright 2014 The Chromium Authors. All rights reserved.
|
|
:: Use of this source code is governed by a BSD-style license that can be
|
|
:: found in the LICENSE file.
|
|
setlocal
|
|
|
|
:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used
|
|
:: standalone, but allow other PATH manipulations to take priority.
|
|
set PATH=%PATH%;%~dp0
|
|
|
|
:: Defer control.
|
|
python3 "%~dp0\google_java_format.py" %*
|