On 5/27/15 5:08 PM, Andres Freund wrote: > I don't think I need to. clang-format has apparently done pretty much > what I described:
Well, that appears to work reasonably well in practice, which is all we can hope for. Unfortunately, clang-format makes a bit of a mess of some of our code, so it isn't quite ready. (There is hope, however. I recall significant improvements between 3.5 and 3.6.) For amusement, I have attached a .clang-format that I have been working on.
# -*- yaml -*- # git ls-files -i -x '*.[ch]' | xargs clang-format-3.6 -i --- Language: Cpp BasedOnStyle: LLVM AllowShortFunctionsOnASingleLine: None AlwaysBreakAfterDefinitionReturnType: true BreakBeforeBinaryOperators: false BreakBeforeTernaryOperators: false BreakConstructorInitializersBeforeComma: true ColumnLimit: 82 IndentCaseLabels: true MaxEmptyLinesToKeep: 3 IndentWidth: 4 TabWidth: 4 UseTab: Always BreakBeforeBraces: Allman SpaceAfterCStyleCast: true ForEachMacros: [ foreach ] ...
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers