From 5b4eb23cfd872e7de993f2e750ce6efd29296fc9 Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Tue, 14 Mar 2017 14:06:31 -0700 Subject: [PATCH] Remove extraneous .clang-format files The .clang-format files in the base, debuggerd, adb, libprocinfo, and fastboot subdirectories each differ slightly from the top level .clang-format-2 and .clang-format-4, but not in a substantially meaningful way, as the source files in those directories have not been re-formatted with clang-format. Therefore, let's reduce the differences and use only the two top level clang-format files. Secondly perform some small clean-up of the top level .clang-format files. AllowShortBlocksOnASingleLine is already false in the Google style, so it can be removed. AllowShortFunctionsOnASingleLine should not change between the -2 and -4 versions, so leave it at the Google default style in both, which is 'All'. The diff stats for these changes are: ./base/ Old: 640 insertions(+), 531 deletions(-) New: 563 insertions(+), 808 deletions(-) ./debuggerd/ Old: 910 insertions(+), 886 deletions(-) New: 991 insertions(+), 1023 deletions(-) ./adb/ Old: 2623 insertions(+), 2886 deletions(-) New: 2655 insertions(+), 3103 deletions(-) ./libprocinfo/ Old: 2 insertions(+), 1 deletion(-) New: 4 insertions(+), 18 deletions(-) ./fastboot/ Old: 618 insertions(+), 743 deletions(-) New: 726 insertions(+), 882 deletions(-) ./init/ Old: 1755 insertions(+), 1866 deletions(-) New: 1715 insertions(+), 1952 deletions(-) Test: Above clang-format stats Change-Id: I3f7b8ab0660c8394c5008ba95ea15e70dd22b55b --- .clang-format-2 | 4 ---- .clang-format-4 | 3 --- adb/.clang-format | 14 +------------- base/.clang-format | 12 +----------- debuggerd/.clang-format | 16 +--------------- fastboot/.clang-format | 16 +--------------- libprocinfo/.clang-format | 15 +-------------- 7 files changed, 5 insertions(+), 75 deletions(-) mode change 100644 => 120000 adb/.clang-format mode change 100644 => 120000 base/.clang-format mode change 100644 => 120000 debuggerd/.clang-format mode change 100644 => 120000 fastboot/.clang-format mode change 100644 => 120000 libprocinfo/.clang-format diff --git a/.clang-format-2 b/.clang-format-2 index fb967d888..aab4665d6 100644 --- a/.clang-format-2 +++ b/.clang-format-2 @@ -1,8 +1,4 @@ BasedOnStyle: Google -AllowShortBlocksOnASingleLine: false -AllowShortFunctionsOnASingleLine: true - -AccessModifierOffset: -1 ColumnLimit: 100 CommentPragmas: NOLINT:.* DerivePointerAlignment: false diff --git a/.clang-format-4 b/.clang-format-4 index fc4eb1bc0..1497447fe 100644 --- a/.clang-format-4 +++ b/.clang-format-4 @@ -1,7 +1,4 @@ BasedOnStyle: Google -AllowShortBlocksOnASingleLine: false -AllowShortFunctionsOnASingleLine: false - AccessModifierOffset: -2 ColumnLimit: 100 CommentPragmas: NOLINT:.* diff --git a/adb/.clang-format b/adb/.clang-format deleted file mode 100644 index fc4eb1bc0..000000000 --- a/adb/.clang-format +++ /dev/null @@ -1,13 +0,0 @@ -BasedOnStyle: Google -AllowShortBlocksOnASingleLine: false -AllowShortFunctionsOnASingleLine: false - -AccessModifierOffset: -2 -ColumnLimit: 100 -CommentPragmas: NOLINT:.* -DerivePointerAlignment: false -IndentWidth: 4 -PointerAlignment: Left -TabWidth: 4 -UseTab: Never -PenaltyExcessCharacter: 32 diff --git a/adb/.clang-format b/adb/.clang-format new file mode 120000 index 000000000..1af4f51dd --- /dev/null +++ b/adb/.clang-format @@ -0,0 +1 @@ +../.clang-format-4 \ No newline at end of file diff --git a/base/.clang-format b/base/.clang-format deleted file mode 100644 index 2b83a1f41..000000000 --- a/base/.clang-format +++ /dev/null @@ -1,11 +0,0 @@ -BasedOnStyle: Google -AllowShortBlocksOnASingleLine: false -AllowShortFunctionsOnASingleLine: false - -CommentPragmas: NOLINT:.* -DerivePointerAlignment: false -IndentWidth: 2 -PointerAlignment: Left -TabWidth: 2 -UseTab: Never -PenaltyExcessCharacter: 32 diff --git a/base/.clang-format b/base/.clang-format new file mode 120000 index 000000000..fd0645fdf --- /dev/null +++ b/base/.clang-format @@ -0,0 +1 @@ +../.clang-format-2 \ No newline at end of file diff --git a/debuggerd/.clang-format b/debuggerd/.clang-format deleted file mode 100644 index 9b7478c07..000000000 --- a/debuggerd/.clang-format +++ /dev/null @@ -1,15 +0,0 @@ -BasedOnStyle: Google -AllowShortBlocksOnASingleLine: false -AllowShortFunctionsOnASingleLine: false - -ColumnLimit: 100 -CommentPragmas: NOLINT:.* -DerivePointerAlignment: false -IndentWidth: 2 -ContinuationIndentWidth: 2 -PointerAlignment: Left -TabWidth: 2 -UseTab: Never -PenaltyExcessCharacter: 32 - -Cpp11BracedListStyle: false diff --git a/debuggerd/.clang-format b/debuggerd/.clang-format new file mode 120000 index 000000000..fd0645fdf --- /dev/null +++ b/debuggerd/.clang-format @@ -0,0 +1 @@ +../.clang-format-2 \ No newline at end of file diff --git a/fastboot/.clang-format b/fastboot/.clang-format deleted file mode 100644 index bcb8d8ac0..000000000 --- a/fastboot/.clang-format +++ /dev/null @@ -1,15 +0,0 @@ -BasedOnStyle: Google -AllowShortBlocksOnASingleLine: false -AllowShortFunctionsOnASingleLine: Inline - -ColumnLimit: 100 -CommentPragmas: NOLINT:.* -DerivePointerAlignment: false -IndentWidth: 4 -ContinuationIndentWidth: 8 -ConstructorInitializerIndentWidth: 8 -AccessModifierOffset: -2 -PointerAlignment: Left -TabWidth: 4 -UseTab: Never -PenaltyExcessCharacter: 32 diff --git a/fastboot/.clang-format b/fastboot/.clang-format new file mode 120000 index 000000000..1af4f51dd --- /dev/null +++ b/fastboot/.clang-format @@ -0,0 +1 @@ +../.clang-format-4 \ No newline at end of file diff --git a/libprocinfo/.clang-format b/libprocinfo/.clang-format deleted file mode 100644 index b8c642840..000000000 --- a/libprocinfo/.clang-format +++ /dev/null @@ -1,14 +0,0 @@ -BasedOnStyle: Google -AllowShortBlocksOnASingleLine: false -AllowShortFunctionsOnASingleLine: false - -ColumnLimit: 100 -CommentPragmas: NOLINT:.* -DerivePointerAlignment: false -IndentWidth: 2 -PointerAlignment: Left -TabWidth: 2 -UseTab: Never -PenaltyExcessCharacter: 32 - -Cpp11BracedListStyle: false diff --git a/libprocinfo/.clang-format b/libprocinfo/.clang-format new file mode 120000 index 000000000..fd0645fdf --- /dev/null +++ b/libprocinfo/.clang-format @@ -0,0 +1 @@ +../.clang-format-2 \ No newline at end of file