Lines Matching +full:pip +full:- +full:clang +full:- +full:version
3 # american fuzzy lop++ - custom code formatter
4 # --------------------------------------------
9 # Copyright 2019-2023 AFLplusplus Project. All rights reserved.
11 # Licensed under the Apache License, Version 2.0 (the "License");
15 # http://www.apache.org/licenses/LICENSE-2.0
33 Check if the correct version of clang-format is installed via pip.
36 bool: True if the correct version of clang-format is installed,
39 # Check if clang-format is installed
41 # Check if the installed version is the expected LLVM version
42 if importlib.metadata.version('clang-format')\
46 # Return False, because the clang-format version does not match
53 with open(".clang-format") as f:
60 CLANG_FORMAT_BIN = f"clang-format-{CURRENT_LLVM}"
64 print(f"[!] clang-format-{CURRENT_LLVM} is needed. Aborted.")
65 print(f"Run `pip3 install \"clang-format=={CURRENT_LLVM}.*\"` \
66 to install via pip.")
70 CLANG_FORMAT_BIN = shutil.which("clang-format")
82 src = str(src, "utf-8")
97 and len(line) < (COLUMN_LIMIT - 2)
102 + " " * (COLUMN_LIMIT - 2 - len(line))
108 last_line = last_line[:-1]
141 print("Usage: ./format.py [-i] <filename>")
143 print(" The -i option, if specified, let the script to modify in-place")
149 if args[0] == "-i":