https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/70883
>From 646cabcf167facb63c78277b50ea62afbc61b3c0 Mon Sep 17 00:00:00 2001
From: Conrad Donahue
Date: Tue, 31 Oct 2023 21:55:27 -0400
Subject: [PATCH 1/5] Add ability for clang-format-diff to exit with non-0
status
@@ -95,6 +95,12 @@ def main():
default="clang-format",
help="location of binary to use for clang-format",
)
+parser.add_argument(
+"-non-zero-exit-code",
+action="store_true",
+default=False,
+help="exit with a non-zero st
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/70883
>From 646cabcf167facb63c78277b50ea62afbc61b3c0 Mon Sep 17 00:00:00 2001
From: Conrad Donahue
Date: Tue, 31 Oct 2023 21:55:27 -0400
Subject: [PATCH 1/4] Add ability for clang-format-diff to exit with non-0
status
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/70883
>From 646cabcf167facb63c78277b50ea62afbc61b3c0 Mon Sep 17 00:00:00 2001
From: Conrad Donahue
Date: Tue, 31 Oct 2023 21:55:27 -0400
Subject: [PATCH 1/3] Add ability for clang-format-diff to exit with non-0
status
@@ -325,6 +325,7 @@ output of a unified diff and reformats all contained lines
with
The name of the predefined style used as a fallback
in case clang-format is invoked with-style=file, but can not
find the .clang-formatfile t
https://github.com/mydeveloperday approved this pull request.
Let go without the option for now
https://github.com/llvm/llvm-project/pull/70883
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-
@@ -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:
I was aware o
@@ -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)
HazardyKnusperkeks wrote:
B
@@ -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
https://github.com/conrad-donahue updated
https://github.com/llvm/llvm-project/pull/70883
>From 646cabcf167facb63c78277b50ea62afbc61b3c0 Mon Sep 17 00:00:00 2001
From: Conrad Donahue
Date: Tue, 31 Oct 2023 21:55:27 -0400
Subject: [PATCH 1/2] Add ability for clang-format-diff to exit with non-0
github-actions[bot] wrote:
:warning: Python code formatter, darker found issues in your code. :warning:
You can test this locally with the following command:
``bash
darker --check --diff -r
2164a449dc7a9daf610b789ba0ec7d1eca7305ef..646cabcf167facb63c78277b50ea62afbc61b3c0
clang/
https://github.com/conrad-donahue created
https://github.com/llvm/llvm-project/pull/70883
This patch adds the ability for the clang-format-diff script to exit with a
non-zero status if it detects that formatting changes are necessary. This makes
it easier to use clang-format-diff as part of a
12 matches
Mail list logo