[PATCH] D147422: [clang-format] NFC Document the other space before colon option
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 4 22:51:41 PDT 2023
owenpan added a comment.
In D147422#4240024 <https://reviews.llvm.org/D147422#4240024>, @MyDeveloperDay wrote:
> In D147422#4240021 <https://reviews.llvm.org/D147422#4240021>, @owenpan wrote:
>
>> Should we extend `SpacesInContainerLiterals` so that it controls JSON colons too? If yes, then we don't need `SpaceBeforeJsonColon`. Otherwise, IMO we should leave the doc alone.
>
> My concern for `SpacesInContainerLiterals` is that it impacts arrays contents too '[ 1, 2, 3 ]'.
It already affects JSON arrays if `BreakArrays` is set to false:
$ cat foo.json
[1, 2, 3]
$ clang-format -style='{BreakArrays: false}' foo.json
[ 1, 2, 3 ]
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147422/new/
https://reviews.llvm.org/D147422
More information about the cfe-commits
mailing list