diff options
author | Maciej Domanski <maciej.domanski@trailofbits.com> | 2022-12-28 11:10:38 +0100 |
---|---|---|
committer | Maciej Domanski <maciej.domanski@trailofbits.com> | 2022-12-28 11:10:38 +0100 |
commit | 8817da8ae4038b0a155fde9e1f3ea8d4f7d8c107 (patch) | |
tree | 7aaf95ae231655b8407be2a1807932b4338408d9 | |
parent | 1149b131857af5e785a1bf3d72b4d15c5d542e46 (diff) | |
download | afl++-8817da8ae4038b0a155fde9e1f3ea8d4f7d8c107.tar.gz |
Removed a modified file from pr
-rwxr-xr-x | .custom-format.py | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/.custom-format.py b/.custom-format.py index aaa84af6..428d7b0d 100755 --- a/.custom-format.py +++ b/.custom-format.py @@ -58,16 +58,16 @@ def custom_format(filename): in_define = True if ( - "/*" in line - and not line.strip().startswith("/*") - and line.endswith("*/") - and len(line) < (COLUMN_LIMIT - 2) + "/*" in line + and not line.strip().startswith("/*") + and line.endswith("*/") + and len(line) < (COLUMN_LIMIT - 2) ): cmt_start = line.rfind("/*") line = ( - line[:cmt_start] - + " " * (COLUMN_LIMIT - 2 - len(line)) - + line[cmt_start:] + line[:cmt_start] + + " " * (COLUMN_LIMIT - 2 - len(line)) + + line[cmt_start:] ) define_padding = 0 @@ -76,21 +76,21 @@ def custom_format(filename): define_padding = max(0, len(last_line[last_line.rfind("\n") + 1 :])) if ( - last_line is not None - and last_line.strip().endswith("{") - and line.strip() != "" + last_line is not None + and last_line.strip().endswith("{") + and line.strip() != "" ): line = (" " * define_padding + "\\" if in_define else "") + "\n" + line elif ( - last_line is not None - and last_line.strip().startswith("}") - and line.strip() != "" + last_line is not None + and last_line.strip().startswith("}") + and line.strip() != "" ): line = (" " * define_padding + "\\" if in_define else "") + "\n" + line elif ( - line.strip().startswith("}") - and last_line is not None - and last_line.strip() != "" + line.strip().startswith("}") + and last_line is not None + and last_line.strip() != "" ): line = (" " * define_padding + "\\" if in_define else "") + "\n" + line @@ -123,4 +123,4 @@ for filename in args: with open(filename, "w") as f: f.write(code) else: - print(code) \ No newline at end of file + print(code) |