mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
Summary: Provide a pre-commit hook that does flake8 and clang tidy checks. Enables the clang-tidy script to run in parallel to make it fast enough to be used in a pre-commit hook. Pull Request resolved: https://github.com/pytorch/pytorch/pull/15102 Reviewed By: soumith Differential Revision: D13429629 Pulled By: zdevito fbshipit-source-id: bd52fe5652f29b033de8d9926d78350b2da4c2fc
12 lines
303 B
Bash
Executable file
12 lines
303 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
echo "Running pre-commit flake8"
|
|
python tools/flake8_hook.py
|
|
echo "Running pre-commit clang-tidy"
|
|
python tools/clang_tidy.py \
|
|
--paths torch/csrc \
|
|
--diff HEAD \
|
|
-g"-torch/csrc/distributed/Module.cpp" \
|
|
-g"-torch/csrc/jit/export.cpp" \
|
|
-g"-torch/csrc/jit/import.cpp" \
|
|
-j
|