Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clang-format style file #106

Open
metab0t opened this issue Apr 27, 2022 · 1 comment
Open

Add clang-format style file #106

metab0t opened this issue Apr 27, 2022 · 1 comment

Comments

@metab0t
Copy link
Contributor

metab0t commented Apr 27, 2022

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.

@abdoei
Copy link
Contributor

abdoei commented Apr 21, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants