[zenity] Adding clang-format script



commit 8c5e60de83618a5b2a9344223cc56ee29eacf3a4
Author: Arx Cruz <arxcruz redhat com>
Date:   Fri Apr 7 13:50:47 2017 +0200

    Adding clang-format script
    
    All the code in zenity from now, will follow this format style

 .clang-format   |   34 ++++++++++++++++++++++++++++++++++
 utils/format.sh |    3 +++
 2 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..3ae33fc
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,34 @@
+---
+BasedOnStyle: GNU
+AlignAfterOpenBracket: DontAlign
+AlignConsecutiveAssignments: 'false'
+AlignConsecutiveDeclarations: 'false'
+AlignOperands: 'false'
+AlignTrailingComments: 'false'
+AllowAllParametersOfDeclarationOnNextLine: 'false'
+AllowShortBlocksOnASingleLine: 'false'
+AllowShortCaseLabelsOnASingleLine: 'false'
+AllowShortFunctionsOnASingleLine: 'None'
+AllowShortLoopsOnASingleLine: 'false'
+AllowShortIfStatementsOnASingleLine: 'false'
+BinPackArguments: 'false'
+BinPackParameters: 'true'
+BreakBeforeBinaryOperators: None
+BreakBeforeBraces: Attach
+BreakBeforeTernaryOperators: 'true'
+BreakConstructorInitializersBeforeComma: 'true'
+Cpp11BracedListStyle: true
+ColumnLimit: '80'
+ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
+IndentCaseLabels: 'true'
+Language: Cpp
+NamespaceIndentation: None
+PointerAlignment: Right
+SortIncludes: 'true'
+SpaceAfterCStyleCast: 'true'
+Standard: Cpp03
+IndentWidth: 4
+TabWidth: 4
+UseTab: Always
+...
+
diff --git a/utils/format.sh b/utils/format.sh
new file mode 100644
index 0000000..7d557e1
--- /dev/null
+++ b/utils/format.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+find src -type f \( -iname '*.c' -or -iname '*.h' \) -exec clang-format -i -style=file {} \;
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]