pytorch/tools/linter/clang_format_ci.sh
Rong Rong (AI Infra) 7e619b9588 First step to rearrange files in tools folder (#60473)
Summary:
Changes including:
- introduced `linter/`, `testing/`, `stats/` folders in `tools/`
- move appropriate scripts into these folders
- change grepped references in the pytorch/pytorch repo

Next step
- introduce `build/` folder for build scripts

Pull Request resolved: https://github.com/pytorch/pytorch/pull/60473

Test Plan:
- CI (this is important b/c pytorch/test-infra also rely on some script reference.
- tools/tests/

Reviewed By: albanD

Differential Revision: D29352716

Pulled By: walterddr

fbshipit-source-id: bad40b5ce130b35dfd9e59b8af34f9025f3285fd
2021-06-24 10:13:58 -07:00

14 lines
428 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/linter/git-clang-format --verbose "$1" --