libcxxwrap-julia icon indicating copy to clipboard operation
libcxxwrap-julia copied to clipboard

Add clang-format style file

Open metab0t opened this issue 2 years ago • 1 comments

Maybe we should add a .clang-format file to format all the code?

Github actions can also be set up to format code on PR automatically.

metab0t avatar Apr 27 '22 15:04 metab0t

Using mikr/whatstyle on src/jlcxx.cpp has given this reasonable .clang-format file

BasedOnStyle: Chromium
AlignAfterOpenBracket: AlwaysBreak
BinPackParameters: true
BraceWrapping:
  AfterControlStatement: true
  AfterFunction: true
  AfterNamespace: true
  BeforeElse: true
BreakBeforeBraces: Custom
BreakConstructorInitializers: AfterColon
ColumnLimit: 0
ConstructorInitializerIndentWidth: 2
FixNamespaceComments: false
IndentAccessModifiers: true
MaxEmptyLinesToKeep: 2
SpaceAfterTemplateKeyword: false
SpaceBeforeParens: Never
SpacesBeforeTrailingComments: 0

abdoei avatar Apr 21 '24 21:04 abdoei