[RFC,v1,1/3] meson: Add `meson.format` file
diff mbox series

Message ID 20260202112511.640320-2-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • meson: Add `meson.format` file
Related show

Commit Message

Barnabás Pőcze Feb. 2, 2026, 11:25 a.m. UTC
Since meson 1.5.0, `meson format` subcommand is available for
formatting meson.build files[0]. This formatter uses the `meson.format`
file to store options. So add one, mostly instructing it to follow
the existing .editorconfig settings.

[0]: https://mesonbuild.com/Commands.html#format

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---
I tried to match the current formatting, but only changed those options
that have different defaults.

There does not seem to be an option that matches the current formatting
of long lines. So I'm afraid those need to change if `meson format` is
to be used. I quite like `kwargs_force_multiline=true` personally,
so wouldn't mind too much.
---
 meson.format | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100644 meson.format

--
2.52.0

Patch
diff mbox series

diff --git a/meson.format b/meson.format
new file mode 100644
index 000000000..c50ca9b0a
--- /dev/null
+++ b/meson.format
@@ -0,0 +1,2 @@ 
+use_editor_config = true
+wide_colon = true