Skip to content

meson format option to preserve trailing commas new lines #14721

@Ericson2314

Description

@Ericson2314

See NixOS/nix#13377 requesting a work-around until this is written, and NixOS/nix#13350 for the original format changes. Diffs like

 libplugintest = shared_module(
   'plugintest',
   'plugintest.cc',
-  dependencies : [
-    dependency('nix-expr'),
-  ],
+  dependencies : [ dependency('nix-expr') ],
   build_by_default : false,
 )

I don't like, because it means when lists get longer and shorter, there is more "churn". I rather "pay up front" with a multi-line list that might seem overkill, in case the list gets longer.

FWIW, clang-format does seem to preserve trailing commas, at least with the settings we use for Nix.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions