diff options
| author | Charles Brunet <charles.brunet@optelgroup.com> | 2025-08-05 14:27:49 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2025-08-26 01:31:38 -0400 |
| commit | 70b0de49f67d326379981334b9c0efa234dcf4f2 (patch) | |
| tree | b12f419e004131559eb797754d36488ba1e6d555 | |
| parent | 84c1791a011e4c07ec13cb98d5663b42ce39a18b (diff) | |
| download | meson-70b0de49f67d326379981334b9c0efa234dcf4f2.tar.gz | |
format: do not group '--' arg
The group_arg_value option allow to put --key and its value on the
same line on multiline arguments. However, when the options is
`--`, it is an argument separator, and should not be grouped with
the following argument.
| -rw-r--r-- | mesonbuild/mformat.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/mformat.py b/mesonbuild/mformat.py index 2131ff7b3..de3b7c50a 100644 --- a/mesonbuild/mformat.py +++ b/mesonbuild/mformat.py @@ -670,7 +670,7 @@ class ArgumentFormatter(FullAstVisitor): if self.config.group_arg_value: for arg in node.arguments[:-1]: group_args = False - if isinstance(arg, mparser.StringNode) and arg.value.startswith('--'): + if isinstance(arg, mparser.StringNode) and arg.value.startswith('--') and arg.value != '--': next_arg = node.arguments[arg_index + 1] if isinstance(next_arg, mparser.StringNode) and not next_arg.value.startswith('--'): group_args = True |
