Bitcoin full node and query server

Dec 24, 2018

View in context in the libbitcoin Slack #general mirror.

jungly12:11
You are totally right on watching out for the style. Consistency is important. It's just hard for a newcomer like me who is used to let the machine watch out for my inconsistencies. I am curious to find something that works on my setup (Emacs) and visual studio without too many external dependencies. I like the promise of clang-format, but as you said, it's hard to find something that makes sense for every setup. I'll keep you posted on what I find useful.
jungly14:52
I used the LLVM initial config and formatted it to - order include files as per the styles page - make brace wrapping as true to style as possible. (It still breaks for lambda expressions) - used bin packaging for args and params, but it creates another issue with putting all args/params on a new line - expression/statement alignment - breaks at binary operator - small misc other changes Would love any recommended changes/improvements to meet the style. Just hoping it’ll ease load on reviews, aka Eric! 😉
.clang-format Plain Text · 3.3 KB
---
Language:        Cpp
# BasedOnStyle:  WebKit
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands:   false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BraceWrapping:   
  AfterClass:      true
  AfterControlStatement: true
  AfterEnum:       true
  AfterFunction:   true
  AfterNamespace:  false
  AfterObjCDeclaration: false
  AfterStruct:     true
  AfterUnion:      true
  AfterExternBlock: false
  BeforeCatch:     false
  BeforeElse:      true
  IndentBraces:    false
  SplitEmptyFunction: true
  SplitEmptyRecord: true
  SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
full file