[PATCH 1/3] Sort the entries in .clang-format alphabetically.

K. "pestophagous" Heller pestophagous at gmail.com
Sat Oct 17 17:05:34 PDT 2015


No changes were made to the values of the entries.
Sorting makes it easier for a clang-format n00b to
compare each setting to its documentation on the
http://clang.llvm.org/docs/ClangFormatStyleOptions.html
web page.

Signed-off-by: K. Heller <pestophagous at gmail.com>
---

I think I know the reason why these were _not_ already in alphabetical
order, and I understand it was not due to any carelessness. For
whatever reason, if you follow the advice on the clang-format
documentation and use their '-dump-config' flag to create an initial
.clang-format config, then you end up with the non-alphabetized
listing.

Regardless, I find it much easier to study the meaning of each item
once the items are sorted. The web pages for clang-format explain them
in alpha order.

 .clang-format | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/.clang-format b/.clang-format
index 0921367..c441d9e 100644
--- a/.clang-format
+++ b/.clang-format
@@ -1,22 +1,22 @@
-AlignEscapedNewlinesLeft: true
 AccessModifierOffset: -8 # so public: and private: stays at the left site
+AlignEscapedNewlinesLeft: true
 AllowAllParametersOfDeclarationOnNextLine: false
 BinPackParameters: true
 BreakBeforeBinaryOperators: false
 BreakBeforeBraces: Linux
 BreakBeforeTernaryOperators: false
 BreakConstructorInitializersBeforeComma: false
-ConstructorInitializerAllOnOneLineOrOnePerLine: true
 ColumnLimit: 0
+ConstructorInitializerAllOnOneLineOrOnePerLine: true
+ContinuationIndentWidth: 8
+# ForEachMacros doesn't work, yet -> ForEachMacros: "Q_FOREACH"
 IndentFunctionDeclarationAfterType: false #personal taste, good for long methods
 IndentWidth: 8
-ContinuationIndentWidth: 8
 MaxEmptyLinesToKeep: 2
 NamespaceIndentation: All
+PointerBindsToType: false
 SpaceBeforeAssignmentOperators: true
-# doesn't work --> SpaceBeforeParens: ControlStatements
-SpacesInParentheses: false
+# SpaceBeforeParens doesn't work --> SpaceBeforeParens: ControlStatements
 SpacesBeforeTrailingComments: 1
+SpacesInParentheses: false
 UseTab: Always
-PointerBindsToType: false
-# doesn't work, yet -> ForEachMacros: "Q_FOREACH"
-- 
2.5.0



More information about the subsurface mailing list