clang-format-diff: Output diff for multiple files, not just one

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 <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2019-12-12 09:56:17 +00:00
parent 742a7b125e
commit 9ec69ae6af

View File

@ -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__':