[SCM] Samba Shared Repository - branch master updated

Ralph Böhme slow at samba.org
Wed Jul 20 18:24:01 UTC 2022


The branch, master has been updated
       via  3d95220a571 Add a .clang-format file
      from  4c12840e42b testprogs: Reformat common_test_fns.inc

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 3d95220a5710731a32a6678ad2878ef6af94b9bb
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Jul 19 15:38:27 2022 +0200

    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 at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Ralph Böhme <slow at samba.org>
    Autobuild-Date(master): Wed Jul 20 18:23:49 UTC 2022 on sn-devel-184

-----------------------------------------------------------------------

Summary of changes:
 .clang-format    | 26 ++++++++++++++++++++++++++
 README.Coding.md | 20 ++++++++------------
 2 files changed, 34 insertions(+), 12 deletions(-)
 create mode 100644 .clang-format


Changeset truncated at 500 lines:

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
diff --git a/README.Coding.md b/README.Coding.md
index b87580f5f85..09a13283e05 100644
--- a/README.Coding.md
+++ b/README.Coding.md
@@ -88,20 +88,16 @@ displaying trailing whitespace:
   autocmd BufNewFile,BufRead *.c,*.h exec 'match Todo /\%>' . &textwidth . 'v.\+/'
 ```
 
-### clang-format
+### How to use clang-format
 
-```
-BasedOnStyle: LLVM
-IndentWidth: 8
-UseTab: true
-BreakBeforeBraces: Linux
-AllowShortIfStatementsOnASingleLine: false
-IndentCaseLabels: false
-BinPackParameters: false
-BinPackArguments: false
-SortIncludes: false
-```
+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.
 
 ## FAQ & Statement Reference
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list