From 68f964a63519f92a662b78f86db550a93a4ae4e7 Mon Sep 17 00:00:00 2001 From: "L. E. Segovia" Date: Tue, 4 Feb 2025 18:38:36 -0300 Subject: [PATCH] gst-indent: Synchronize defaults with our fork of GNU indent Part-of: --- scripts/gst_indent_common.py | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/scripts/gst_indent_common.py b/scripts/gst_indent_common.py index d5abd05629..981a0b5cf6 100644 --- a/scripts/gst_indent_common.py +++ b/scripts/gst_indent_common.py @@ -10,25 +10,8 @@ def indent(*args): version = subprocess.run([indent, '--version'], capture_output=True, text=True) - if 'GNU' not in version.stdout: + if 'gst-indent' not in version.stdout: raise RuntimeError(f'''Did not find gst-indent-1.0, please install it before continuing. (Found {indent}, but it doesn't seem to be gst-indent-1.0)''') - # Run twice. GNU indent isn't idempotent - # when run once - for i in range(2): - subprocess.check_call([indent, - '--braces-on-if-line', - '--case-brace-indentation0', - '--case-indentation2', - '--braces-after-struct-decl-line', - '--line-length80', - '--no-tabs', - '--cuddle-else', - '--dont-line-up-parentheses', - '--continuation-indentation4', - '--honour-newlines', - '--tab-size8', - '--indent-level2', - '--leave-preprocessor-space'] + list(args) - ) + subprocess.check_call([indent] + list(args))