[llvm-bugs] [Bug 48251] New: clang-format -dump-config should dump all settings alphabetically

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Nov 21 12:57:26 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=48251

            Bug ID: 48251
           Summary: clang-format -dump-config should dump all settings
                    alphabetically
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: legalize at xmission.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

The main use case for dumping the configuration is because you want to
match all the settings to your existing in-house style and that isn't one
of the existing canned styles.

The reasonable way to do this is to run -dump-config in order to get all
the settings and go through them one-by-one with the documentation open.

The documentation lists all the settings in sorted order, but the settings
aren't necessarily dumped out in sorted order when you run -dump-config.

A small example:

IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: true

Now this isn't *wildly* out of sorted order, but some of the config settings
have lengthy descriptions making you scroll back and forth and lose your
place of which setting you were updating.

It would be easier if clang-format emitted all settings in alphabetical order.
Due to the nature of the YAML settings dump, it isn't feasible to just pipe
the output into sort.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201121/124894ff/attachment.html>


More information about the llvm-bugs mailing list