Lines Matching +full:clang +full:- +full:format
3 # american fuzzy lop++ - custom code formatter
4 # --------------------------------------------
9 # Copyright 2019-2022 AFLplusplus Project. All rights reserved.
15 # http://www.apache.org/licenses/LICENSE-2.0
25 with open(".clang-format") as f:
32 p = subprocess.Popen(["clang-format-11", "--version"], stdout=subprocess.PIPE)
34 o = str(o, "utf-8")
36 # o = o[len("clang-format version "):].strip()
40 print("clang-format-11 is needed. Aborted.")
43 # if subprocess.call(['which', 'clang-format-7'], stdout=subprocess.PIPE) == 0:
44 # CLANG_FORMAT_BIN = 'clang-format-7'
45 # elif subprocess.call(['which', 'clang-format-8'], stdout=subprocess.PIPE) == 0:
46 # CLANG_FORMAT_BIN = 'clang-format-8'
47 # elif subprocess.call(['which', 'clang-format-9'], stdout=subprocess.PIPE) == 0:
48 # CLANG_FORMAT_BIN = 'clang-format-9'
49 # elif subprocess.call(['which', 'clang-format-11'], stdout=subprocess.PIPE) == 0:
50 # CLANG_FORMAT_BIN = 'clang-format-11'
52 # print ("clang-format 7 or above is needed. Aborted.")
55 CLANG_FORMAT_BIN = "clang-format-11"
67 src = str(src, "utf-8")
82 and len(line) < (COLUMN_LIMIT - 2)
87 + " " * (COLUMN_LIMIT - 2 - len(line))
93 last_line = last_line[:-1]
126 print("Usage: ./format.py [-i] <filename>")
128 print(" The -i option, if specified, let the script to modify in-place")
134 if args[0] == "-i":