[PATCH] D121916: [clang-format] [doc] Add script to automatically update help output in ClangFormat.rst.

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 18 01:18:11 PDT 2022


curdeius added inline comments.


================
Comment at: clang/tools/clang-format/ClangFormat.cpp:105
+    SortIncludes("sort-includes",
+                 cl::desc("If set, overrides the include sorting behavior\n"
+                          "determined by the SortIncludes style flag"),
----------------
HazardyKnusperkeks wrote:
> Couldn't one split the string in python? I think an arbitrary position to split the help isn't nice. I for one have often the terminal over half the monitor spread, sometimes even the complete monitor.
Well, these strings are used to generate the output of `clang-format --help`, which is, IIUC, supposed to produce a 80-column output.
I fully agree that it would be better to have it splitted automatically depending on the output screen width, but we're not there yet unfortunately.
And .rst file is just the reflection of what `--help` outputs.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121916/new/

https://reviews.llvm.org/D121916



More information about the cfe-commits mailing list