From 4b96bfde967983e1ca9781c7b11496a76f081f5f Mon Sep 17 00:00:00 2001 From: Boris Tsirkin Date: Mon, 6 Jan 2025 08:20:11 -0800 Subject: [PATCH] Make .clang-format ObjC respect Chromium column limit length Currently, WebRTC .clang-format file is configured to support column length of up to 100: https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/.clang-format;l=12;drc=73012534918d8c65ae748fff8ca18ad5c857b82e While Google guidelines mention supporting up to 100 (https://google.github.io/styleguide/objcguide.html#line-length), Chromium guidelines mention up to 80, like in C++ (https://chromium.googlesource.com/chromium/src/+/lkgr/styleguide/objective-c/objective-c.md#line-length) WebRTC guidelines mention that in case of conflicts, the Chromium guidelines should be followed (https://webrtc.googlesource.com/src/+/HEAD/g3doc/style-guide.md) Hence, I'm suggesting changing the ObjC ColumnLimit parameter from 100 to 80. Bug: webrtc:387828388 Change-Id: If9186bebec92cb0c01015084c3e47ad210dccc33 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373620 Reviewed-by: Harald Alvestrand Commit-Queue: Danil Chapovalov Reviewed-by: Danil Chapovalov Reviewed-by: Mirko Bonadei Cr-Commit-Position: refs/heads/main@{#43663} --- .clang-format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index 63ebecbce1..a5d54596e2 100644 --- a/.clang-format +++ b/.clang-format @@ -9,7 +9,7 @@ Language: ObjC BasedOnStyle: Google BinPackParameters: false BinPackArguments: false -ColumnLimit: 100 +ColumnLimit: 80 ObjCBlockIndentWidth: 2 AllowAllParametersOfDeclarationOnNextLine: true AlignOperands: false