about summary refs log tree commit diff
path: root/.custom-format.py
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2020-02-10 00:19:25 +0100
committerDominik Maier <domenukk@gmail.com>2020-02-10 00:19:25 +0100
commitbf1898736915d34906704f82202d1a8890a3cec4 (patch)
treeab450a0a67ea5c2ec14c5ac9536e4a379d16eb3d /.custom-format.py
parente19e06aba7e81a37f5f1a9974f061ab63bc86986 (diff)
parent33c18c36db70859fc484dd41a317634809d5c043 (diff)
downloadafl++-bf1898736915d34906704f82202d1a8890a3cec4.tar.gz
Merge branch 'master' of github.com:vanhauser-thc/AFLplusplus into unicorn
Diffstat (limited to '.custom-format.py')
-rwxr-xr-x.custom-format.py32
1 files changed, 17 insertions, 15 deletions
diff --git a/.custom-format.py b/.custom-format.py
index f493a2d9..e3779b68 100755
--- a/.custom-format.py
+++ b/.custom-format.py
@@ -29,27 +29,29 @@ CLANG_FORMAT_BIN = os.getenv("CLANG_FORMAT_BIN")
 if CLANG_FORMAT_BIN is None:
     o = 0
     try:
-        p = subprocess.Popen(["clang-format", "--version"], stdout=subprocess.PIPE)
+        p = subprocess.Popen(["clang-format-8", "--version"], stdout=subprocess.PIPE)
         o, _ = p.communicate()
         o = str(o, "utf-8")
         o = o[len("clang-format version "):].strip()
         o = o[:o.find(".")]
         o = int(o)
-    except: pass
-    if o < 7:
-        if subprocess.call(['which', 'clang-format-7'], stdout=subprocess.PIPE) == 0:
-            CLANG_FORMAT_BIN = 'clang-format-7'
-        elif subprocess.call(['which', 'clang-format-8'], stdout=subprocess.PIPE) == 0:
-            CLANG_FORMAT_BIN = 'clang-format-8'
-        elif subprocess.call(['which', 'clang-format-9'], stdout=subprocess.PIPE) == 0:
-            CLANG_FORMAT_BIN = 'clang-format-9'
-        elif subprocess.call(['which', 'clang-format-10'], stdout=subprocess.PIPE) == 0:
-            CLANG_FORMAT_BIN = 'clang-format-10'
-        else:
-            print ("clang-format 7 or above is needed. Aborted.")
-            exit(1)
+    except:
+        print ("clang-format-8 is needed. Aborted.")
+        exit(1)
+    #if o < 7:
+    #    if subprocess.call(['which', 'clang-format-7'], stdout=subprocess.PIPE) == 0:
+    #        CLANG_FORMAT_BIN = 'clang-format-7'
+    #    elif subprocess.call(['which', 'clang-format-8'], stdout=subprocess.PIPE) == 0:
+    #        CLANG_FORMAT_BIN = 'clang-format-8'
+    #    elif subprocess.call(['which', 'clang-format-9'], stdout=subprocess.PIPE) == 0:
+    #        CLANG_FORMAT_BIN = 'clang-format-9'
+    #    elif subprocess.call(['which', 'clang-format-10'], stdout=subprocess.PIPE) == 0:
+    #        CLANG_FORMAT_BIN = 'clang-format-10'
+    #    else:
+    #        print ("clang-format 7 or above is needed. Aborted.")
+    #        exit(1)
     else:
-        CLANG_FORMAT_BIN = 'clang-format'
+        CLANG_FORMAT_BIN = 'clang-format-8'
             
 COLUMN_LIMIT = 80
 for line in fmt.split("\n"):