diff options
Diffstat (limited to 'tools/format.py')
-rwxr-xr-x | tools/format.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/format.py b/tools/format.py index b994535f7..2bbc95bed 100755 --- a/tools/format.py +++ b/tools/format.py @@ -1,9 +1,10 @@ #!/usr/bin/env python import os -from util import run, find_exts +from third_party import third_party_path, fix_symlinks, google_env +from util import root_path, run, find_exts + +fix_symlinks() -root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) -third_party_path = os.path.join(root_path, "third_party") prettier = os.path.join(third_party_path, "node_modules", "prettier", "bin-prettier.js") tools_path = os.path.join(root_path, "tools") @@ -15,7 +16,7 @@ os.chdir(root_path) run(["clang-format", "-i", "-style", "Google"] + find_exts("src", ".cc", ".h")) for fn in ["BUILD.gn", ".gn"] + find_exts("build_extra", ".gn", ".gni"): - run(["third_party/depot_tools/gn", "format", fn]) + run(["third_party/depot_tools/gn", "format", fn], env=google_env()) # TODO(ry) Install yapf in third_party. run(["yapf", "-i"] + find_exts("tools/", ".py") + |