mirror of
https://github.com/zebrajr/pytorch.git
synced 2026-01-15 12:15:51 +00:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/35511 Differential Revision: D20684849 Pulled By: suo fbshipit-source-id: e059e15230d1a4064f45df5c7895b220c9cc20d9
23 lines
534 B
Bash
Executable File
23 lines
534 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 \
|
|
--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"
|
|
python tools/clang_format.py
|