diff options
author | Andreas Schneider <asn@samba.org> | 2022-07-19 15:38:27 +0200 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2022-07-20 18:23:49 +0000 |
commit | 3d95220a5710731a32a6678ad2878ef6af94b9bb (patch) | |
tree | db6a5279d5efb4aaa78de29580b57454ce2834f1 /.clang-format | |
parent | 4c12840e42bde55c756851d38baea84b6a64823c (diff) | |
download | samba-3d95220a5710731a32a6678ad2878ef6af94b9bb.tar.gz |
Add a .clang-format file
How to use:
Install 'git-format-clang' which is part of the clang suite (Fedora:
git-clang-format, openSUSE: clang-tools).
Now do your changes and stage them with `git add`. Once they are staged
format the code using `git clang-format` before you commit.
Now the formatting changed can be viewed with `git diff` against the
staged changes.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Jul 20 18:23:49 UTC 2022 on sn-devel-184
Diffstat (limited to '.clang-format')
-rw-r--r-- | .clang-format | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000000..5385807bc1c --- /dev/null +++ b/.clang-format @@ -0,0 +1,26 @@ +# https://clang.llvm.org/docs/ClangFormatStyleOptions.html +BasedOnStyle: LLVM +IndentWidth: 8 +ContinuationIndentWidth: 8 +UseTab: true +BreakBeforeBraces: Custom +BraceWrapping: + AfterEnum: false + AfterFunction: true + AfterStruct: false + AfterUnion: false + AfterExternBlock: true + BeforeElse: false + BeforeWhile: false +AllowShortIfStatementsOnASingleLine: false +ColumnLimit: 80 +IndentCaseLabels: false +AlignAfterOpenBracket: Align +BinPackParameters: false +BinPackArguments: false +AllowAllParametersOfDeclarationOnNextLine: false +AllowAllArgumentsOnNextLine: false +AllowShortFunctionsOnASingleLine: Empty +AlwaysBreakAfterReturnType: None +AlignEscapedNewlines: Left +SortIncludes: false |