Files
pytorch/tools/linter/clang_format_ci.sh
PyTorch MergeBot 12f67ed2c0 Revert "[ci] delete old linter stuff"
This reverts commit 3a68155ce0973c005457593375801a2cc19de54f.

Reverted https://github.com/pytorch/pytorch/pull/76984 on behalf of https://github.com/janeyx99
2022-05-10 23:17:40 +00:00

16 lines
533 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 './ios/*' -or \
-path './torch/csrc/jit/!(serialization/mobile_bytecode_generated.h)' -or \
-path './torch/csrc/deploy/*' -or \
-path './test/cpp/jit/*' -or \
-path './test/cpp/tensorexpr/*' \
| xargs tools/linter/git-clang-format --verbose "$1" --