Skip to content
Snippets Groups Projects
Commit 077c0553 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

[hooks.pre-commit] do not fail on removed files

parent 9cccb7a8
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,8 @@ def check_file(touched_file, basedir, format_binary, extension_whitelist=CPP_EXT
if os.path.splitext(touched_file)[1] not in extension_whitelist:
return
filename = os.path.join(basedir, touched_file)
if not os.path.isfile(filename):
return
try:
out = subprocess.check_output([format_binary, '-style=file', filename],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment