[clang] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 31 19:59:34 PDT 2023


================
@@ -185,6 +191,8 @@ def main():
             diff_string = "".join(diff)
             if len(diff_string) > 0:
                 sys.stdout.write(diff_string)
+                if args.non_zero_exit_code:
+                    sys.exit(1)
----------------
owenca wrote:

```suggestion
                sys.exit(1)
```
I don't think we need to add an option for this.

https://github.com/llvm/llvm-project/pull/70883


More information about the cfe-commits mailing list