[mutter/wip/carlosg/skip-broken-uncrustify-calls] ci: Ignore uncrustify calls resulting in unsuccessful return codes
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/skip-broken-uncrustify-calls] ci: Ignore uncrustify calls resulting in unsuccessful return codes
- Date: Mon, 23 Aug 2021 11:23:13 +0000 (UTC)
commit a717e20e3070717f5b9d9a2e45d8b5cd2ef8be89
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Aug 23 13:18:06 2021 +0200
ci: Ignore uncrustify calls resulting in unsuccessful return codes
If for some reason uncrustify gets angry at our file and indent on/off
marks, it will result in an error code other than 0. Since in those
cases there is no output to diff with, we misinterpret those situations
as "the whole file should be deleted", which is far from it.
check-style.py | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/check-style.py b/check-style.py
index ac2ffcaad7..a326cd311a 100755
--- a/check-style.py
+++ b/check-style.py
@@ -76,6 +76,10 @@ def reformat_chunks(chunks, rewrite):
# uncrustify chunk
proc = subprocess.Popen(["uncrustify", "-c", uncrustify_cfg, "-f", tmp.name],
stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
+ proc.wait()
+ if proc.returncode != 0:
+ continue
+
reindented = proc.stdout.readlines()
tmp.close()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]