This revision was automatically updated to reflect the committed changes.
Closed by commit rGdc04c54fc1f6: clang-format: [JS] document
InsertTrailingCommas. (authored by mprobst).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73768/new/
https://reviews.llvm.org/D73768
Files:
clang/docs/ClangFormatStyleOptions.rst
clang/docs/ReleaseNotes.rst
Index: clang/docs/ReleaseNotes.rst
===================================================================
--- clang/docs/ReleaseNotes.rst
+++ clang/docs/ReleaseNotes.rst
@@ -175,6 +175,11 @@
}
}
+- Option ``InsertTrailingCommas`` can be set to ``TCS_Wrapped`` to insert
+ trailing commas in container literals (arrays and objects) that wrap across
+ multiple lines. It is currently only available for JavaScript and disabled by
+ default (``TCS_None``).
+
libclang
--------
Index: clang/docs/ClangFormatStyleOptions.rst
===================================================================
--- clang/docs/ClangFormatStyleOptions.rst
+++ clang/docs/ClangFormatStyleOptions.rst
@@ -717,6 +717,26 @@
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
}
+
+**InsertTrailingCommas** (``TrailingCommaStyle``) can be set to ``TCS_Wrapped``
+ to insert trailing commas in container literals (arrays and objects) that
wrap
+ across multiple lines. It is currently only available for JavaScript and
+ disabled by default (``TCS_None``).
+
+ ``InsertTrailingCommas`` cannot be used together with ``BinPackArguments`` as
+ inserting the comma disables bin-packing.
+
+ .. code-block:: c++
+
+ TSC_Wrapped:
+ const someArray = [
+ aaaaaaaaaaaaaaaaaaaaaaaaaa,
+ aaaaaaaaaaaaaaaaaaaaaaaaaa,
+ aaaaaaaaaaaaaaaaaaaaaaaaaa,
+ // ^ inserted
+ ]
+
+
**BinPackParameters** (``bool``)
If ``false``, a function declaration's or function definition's
parameters will either all be on the same line or will have one line each.
Index: clang/docs/ReleaseNotes.rst
===================================================================
--- clang/docs/ReleaseNotes.rst
+++ clang/docs/ReleaseNotes.rst
@@ -175,6 +175,11 @@
}
}
+- Option ``InsertTrailingCommas`` can be set to ``TCS_Wrapped`` to insert
+ trailing commas in container literals (arrays and objects) that wrap across
+ multiple lines. It is currently only available for JavaScript and disabled by
+ default (``TCS_None``).
+
libclang
--------
Index: clang/docs/ClangFormatStyleOptions.rst
===================================================================
--- clang/docs/ClangFormatStyleOptions.rst
+++ clang/docs/ClangFormatStyleOptions.rst
@@ -717,6 +717,26 @@
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
}
+
+**InsertTrailingCommas** (``TrailingCommaStyle``) can be set to ``TCS_Wrapped``
+ to insert trailing commas in container literals (arrays and objects) that wrap
+ across multiple lines. It is currently only available for JavaScript and
+ disabled by default (``TCS_None``).
+
+ ``InsertTrailingCommas`` cannot be used together with ``BinPackArguments`` as
+ inserting the comma disables bin-packing.
+
+ .. code-block:: c++
+
+ TSC_Wrapped:
+ const someArray = [
+ aaaaaaaaaaaaaaaaaaaaaaaaaa,
+ aaaaaaaaaaaaaaaaaaaaaaaaaa,
+ aaaaaaaaaaaaaaaaaaaaaaaaaa,
+ // ^ inserted
+ ]
+
+
**BinPackParameters** (``bool``)
If ``false``, a function declaration's or function definition's
parameters will either all be on the same line or will have one line each.
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits