diff options
author | rhtenhove <rhtenhove@users.noreply.github.com> | 2022-07-04 14:32:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-04 14:32:48 -0400 |
commit | 6c9c8fdc651e3c3376f3ba6590c49424be1844d7 (patch) | |
tree | d656304dd91b8431c00c1cf8228dd83889042c5a /.custom-format.py | |
parent | 3e65e1a029c44b33a77ca04724335ee3ecd30e67 (diff) | |
download | AFLplusplus-6c9c8fdc651e3c3376f3ba6590c49424be1844d7.tar.gz |
check code formatting (#5)
Diffstat (limited to '.custom-format.py')
-rwxr-xr-x | .custom-format.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.custom-format.py b/.custom-format.py index 7ac63396..8c7ea404 100755 --- a/.custom-format.py +++ b/.custom-format.py @@ -19,6 +19,7 @@ import subprocess import sys import os import re +import shutil # string_re = re.compile('(\\"(\\\\.|[^"\\\\])*\\")') # future use @@ -26,6 +27,10 @@ with open(".clang-format") as f: fmt = f.read() CLANG_FORMAT_BIN = os.getenv("CLANG_FORMAT_BIN") + +if CLANG_FORMAT_BIN is None: + CLANG_FORMAT_BIN = shutil.which("clang-format") + if CLANG_FORMAT_BIN is None: o = 0 try: |