From 0e86f636e71d0e364f54087df59453cc7de9e3b4 Mon Sep 17 00:00:00 2001 From: "Li-Huai (Allan) Lin" Date: Mon, 19 Jun 2023 22:07:24 +0800 Subject: [PATCH 1/3] Add objc clang format --- .clang-format | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.clang-format b/.clang-format index 6d0ab740db4..16d30a8aa36 100644 --- a/.clang-format +++ b/.clang-format @@ -60,9 +60,6 @@ MacroBlockBegin: '' MacroBlockEnd: '' MaxEmptyLinesToKeep: 1 NamespaceIndentation: None -ObjCBlockIndentWidth: 2 -ObjCSpaceAfterProperty: false -ObjCSpaceBeforeProtocolList: false PenaltyBreakBeforeFirstCallParameter: 1 PenaltyBreakComment: 300 PenaltyBreakFirstLessLess: 120 @@ -85,4 +82,11 @@ SpacesInSquareBrackets: false Standard: Cpp11 TabWidth: 8 UseTab: Never -... +--- +Language: ObjC +ColumnLimit: 120 +AlignAfterOpenBracket: Align +ObjCBlockIndentWidth: 2 +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: false +... \ No newline at end of file From 7cd51d991b506fb4f76afc085a4f7da0a5a60dd5 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Mon, 19 Jun 2023 15:48:42 +0100 Subject: [PATCH 2/3] Update .clang-format --- .clang-format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index 16d30a8aa36..95d60445f4a 100644 --- a/.clang-format +++ b/.clang-format @@ -89,4 +89,4 @@ AlignAfterOpenBracket: Align ObjCBlockIndentWidth: 2 ObjCSpaceAfterProperty: false ObjCSpaceBeforeProtocolList: false -... \ No newline at end of file +... From 61d8b32c9a2013bedf1720fc59d6d944b9bac173 Mon Sep 17 00:00:00 2001 From: "Li-Huai (Allan) Lin" Date: Tue, 20 Jun 2023 15:41:24 +0800 Subject: [PATCH 3/3] Allow multiple documents in the yaml hook --- .pre-commit-config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 343df7f1021..762ebf6fce0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,6 +6,8 @@ repos: - id: check-toml - id: check-yaml exclude: packaging/.* + args: + - --allow-multiple-documents - id: mixed-line-ending args: [--fix=lf] - id: end-of-file-fixer