Files
pytorch/tools/git-pre-commit
Sergii Dymchenko e3f546af13 Remove flake8 pre-commit hook
Fixes #69500
See the issue for details.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75385
Approved by: https://github.com/seemethere, https://github.com/malfet
2022-04-07 19:01:30 +00:00

11 lines
233 B
Bash
Executable File

#!/bin/bash
set -e
echo "Running pre-commit clang-tidy"
git diff HEAD > pr.diff
python3 -m tools.linter.clang_tidy --diff-file "pr.diff"
rm pr.diff
echo "Running pre-commit clang-format"
tools/linter/git-clang-format HEAD~ --force