From 9ec69ae6af549da334fe22e55f3b4a6a94c86c5b Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 12 Dec 2019 09:56:17 +0000 Subject: [PATCH] clang-format-diff: Output diff for multiple files, not just one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A bug in `clang-format-diff.py` was causing it to only output the formatting diff for the first incorrectly-formatted file, rather than the diffs for all files. That’s not so helpful for reformatting an entire MR in one go. Fix it. Signed-off-by: Philip Withnall --- clang-format-diff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang-format-diff.py b/clang-format-diff.py index 535f285dd..3fb776c59 100755 --- a/clang-format-diff.py +++ b/clang-format-diff.py @@ -125,8 +125,8 @@ def main(): if diff_string: format_line_counter += sys.stdout.write(diff_string) - if format_line_counter > 0: - sys.exit(1) + if format_line_counter > 0: + sys.exit(1) if __name__ == '__main__':