pytorch/tools/clang_format_ci.sh
Scott Wolchok 44cc873fba [PyTorch] Autoformat c10 (#56830)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/56830

Opt into formatting on GitHub and format everything. This is a trial run before turning on formatting for more and eventually all of the codebase.

Test Plan: CI

Reviewed By: zertosh

Differential Revision: D27979080

fbshipit-source-id: a80f0c48691c08ae8ca0af06377b87e6a2351151
2021-04-30 21:23:28 -07:00

14 lines
421 B
Bash
Executable File

#!/bin/sh
set -eux
# Runs clang-format on allowlisted files.
# Requires a single argument, which is the <commit> argument to git-clang-format
# If you edit this allowlist, please edit the one in clang_format_all.py as well
find . -type f \
-path './c10/*' -or \
-path './torch/csrc/jit/*' -or \
-path './test/cpp/jit/*' -or \
-path './test/cpp/tensorexpr/*' \
| xargs tools/git-clang-format --verbose "$1" --