mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/39713 Differential Revision: D22203850 Pulled By: mruberry fbshipit-source-id: 43f690e748b7a3c123ad20f6d640d6dae25c641c
22 lines
557 B
Bash
Executable file
22 lines
557 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
echo "Running pre-commit flake8"
|
|
python tools/flake8_hook.py
|
|
|
|
if [ $(which clang-tidy) ]
|
|
then
|
|
echo "Running pre-commit clang-tidy"
|
|
python tools/clang_tidy.py \
|
|
--paths torch/csrc aten/src/ATen/ \
|
|
--diff HEAD \
|
|
-g"-torch/csrc/jit/serialization/export.cpp" \
|
|
-g"-torch/csrc/jit/serialization/import.cpp" \
|
|
-j
|
|
else
|
|
echo "WARNING: Couldn't find clang-tidy executable."
|
|
echo " Please install it if you want local clang-tidy checks."
|
|
fi
|
|
|
|
echo "Running pre-commit clang-format"
|
|
tools/git-clang-format HEAD~ --force
|