From 0e7249b85c0865671de89d87a11c1d67a26f66cc Mon Sep 17 00:00:00 2001 From: Colin Cornaby Date: Wed, 28 Dec 2022 15:11:36 -0800 Subject: [PATCH 1/5] Adding Clang Format file --- .clang-format | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000000..754651c3f5 --- /dev/null +++ b/.clang-format @@ -0,0 +1,8 @@ +--- +BasedOnStyle: Google +--- +Language: Cpp +# Modifications to the style for Plasma go here +IndentWidth: 4 +ColumnLimit: 0 +--- From ff014ca87f95b7c0973610057460a591eff5e041 Mon Sep 17 00:00:00 2001 From: Colin Cornaby Date: Sat, 31 Dec 2022 16:29:52 -0800 Subject: [PATCH 2/5] Tailoring format to fit Plasma better --- .clang-format | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.clang-format b/.clang-format index 754651c3f5..a1f94f9a8b 100644 --- a/.clang-format +++ b/.clang-format @@ -5,4 +5,26 @@ Language: Cpp # Modifications to the style for Plasma go here IndentWidth: 4 ColumnLimit: 0 +BraceWrapping: + AfterClass: true + AfterControlStatement: MultiLine + AfterEnum: false + AfterFunction: true + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: true + AfterUnion: false + BeforeCatch: false + BeforeElse: false + IndentBraces: false +BreakBeforeBraces: Custom +AlignConsecutiveDeclarations: AcrossComments +AlignConsecutiveAssignments: + Enabled: False +ReflowComments: false +LambdaBodyIndentation: OuterScope +AllowShortBlocksOnASingleLine: true +AllowShortFunctionsOnASingleLine: true +AllowShortIfStatementsOnASingleLine: true +PackConstructorInitializers: CurrentLine --- From 9551150b9a9e2a21a63064c8d0d6754960ace05d Mon Sep 17 00:00:00 2001 From: Colin Cornaby Date: Sun, 15 Oct 2023 14:56:53 -0700 Subject: [PATCH 3/5] Copying clang-format from client work --- .clang-format | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.clang-format b/.clang-format index a1f94f9a8b..57db9a19a7 100644 --- a/.clang-format +++ b/.clang-format @@ -8,12 +8,12 @@ ColumnLimit: 0 BraceWrapping: AfterClass: true AfterControlStatement: MultiLine - AfterEnum: false + AfterEnum: true AfterFunction: true - AfterNamespace: false - AfterObjCDeclaration: false + AfterNamespace: true + AfterObjCDeclaration: true AfterStruct: true - AfterUnion: false + AfterUnion: true BeforeCatch: false BeforeElse: false IndentBraces: false @@ -27,4 +27,7 @@ AllowShortBlocksOnASingleLine: true AllowShortFunctionsOnASingleLine: true AllowShortIfStatementsOnASingleLine: true PackConstructorInitializers: CurrentLine +ObjCBlockIndentWidth: 4 --- +Language: ObjC +# Obj-C specific settings go here From 7eb6dddcbe304037a54f31b2cc8cb16048223e94 Mon Sep 17 00:00:00 2001 From: Colin Cornaby Date: Tue, 17 Oct 2023 22:14:55 -0700 Subject: [PATCH 4/5] Updating format --- .clang-format | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index 57db9a19a7..48d6ba14d9 100644 --- a/.clang-format +++ b/.clang-format @@ -21,13 +21,17 @@ BreakBeforeBraces: Custom AlignConsecutiveDeclarations: AcrossComments AlignConsecutiveAssignments: Enabled: False -ReflowComments: false +ReflowComments: true LambdaBodyIndentation: OuterScope AllowShortBlocksOnASingleLine: true AllowShortFunctionsOnASingleLine: true AllowShortIfStatementsOnASingleLine: true PackConstructorInitializers: CurrentLine ObjCBlockIndentWidth: 4 +SpacesInLineCommentPrefix: + Minimum: 1 + Maximum: -1 +SpacesBeforeTrailingComments: 1 --- Language: ObjC # Obj-C specific settings go here From b5ec44f96b3ee6b3afa8cfa687494216a4d971a1 Mon Sep 17 00:00:00 2001 From: Colin Cornaby Date: Sun, 26 Nov 2023 20:53:20 -0800 Subject: [PATCH 5/5] Updating Clang format file --- .clang-format | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/.clang-format b/.clang-format index 48d6ba14d9..76d0387f80 100644 --- a/.clang-format +++ b/.clang-format @@ -4,10 +4,12 @@ BasedOnStyle: Google Language: Cpp # Modifications to the style for Plasma go here IndentWidth: 4 +AccessModifierOffset: -4 ColumnLimit: 0 +BreakBeforeBraces: Custom BraceWrapping: AfterClass: true - AfterControlStatement: MultiLine + AfterControlStatement: Never AfterEnum: true AfterFunction: true AfterNamespace: true @@ -17,7 +19,7 @@ BraceWrapping: BeforeCatch: false BeforeElse: false IndentBraces: false -BreakBeforeBraces: Custom +IndentAccessModifiers: false AlignConsecutiveDeclarations: AcrossComments AlignConsecutiveAssignments: Enabled: False @@ -35,3 +37,34 @@ SpacesBeforeTrailingComments: 1 --- Language: ObjC # Obj-C specific settings go here +IndentWidth: 4 +AccessModifierOffset: -4 +ColumnLimit: 0 +BreakBeforeBraces: Custom +BraceWrapping: + AfterClass: true + AfterControlStatement: Never + AfterEnum: true + AfterFunction: true + AfterNamespace: true + AfterObjCDeclaration: true + AfterStruct: true + AfterUnion: true + BeforeCatch: false + BeforeElse: false + IndentBraces: false +IndentAccessModifiers: false +AlignConsecutiveDeclarations: AcrossComments +AlignConsecutiveAssignments: + Enabled: False +ReflowComments: true +LambdaBodyIndentation: OuterScope +AllowShortBlocksOnASingleLine: true +AllowShortFunctionsOnASingleLine: true +AllowShortIfStatementsOnASingleLine: true +PackConstructorInitializers: CurrentLine +ObjCBlockIndentWidth: 4 +SpacesInLineCommentPrefix: + Minimum: 1 + Maximum: -1 +SpacesBeforeTrailingComments: 1