Add ObjC as supported .clang-format language
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Oct 2021 17:18:12 +0000 (17:18 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Oct 2021 17:18:12 +0000 (17:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=230401

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-10-20
Reviewed by Jonathan Bedard.

Add ObjC and change few properties useful
for ObjC formatting.

* .clang-format:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284543 268f45cc-cd09-0410-ab3c-d52691b4dbfc

.clang-format
ChangeLog

index eb85667e40a9b97706b0d420a2afa56a8578a042..da2407cafda91390054ddc207d95bf97867d59cd 100644 (file)
@@ -1,5 +1,4 @@
 ---
 ---
-Language:        Cpp
 # BasedOnStyle:  WebKit
 AccessModifierOffset: -4
 AlignAfterOpenBracket: DontAlign
 # BasedOnStyle:  WebKit
 AccessModifierOffset: -4
 AlignAfterOpenBracket: DontAlign
@@ -62,10 +61,14 @@ IncludeCategories:
   - Regex:           '^"config\.h"'
     Priority:        -1
   # The main header for a source file automatically gets category 0
   - Regex:           '^"config\.h"'
     Priority:        -1
   # The main header for a source file automatically gets category 0
+  - Regex:           '^<.*SoftLink.h>'
+    Priority:        4
+  - Regex:           '^".*SoftLink.h"'
+    Priority:        3
+  - Regex:           '^<.*>'
+    Priority:        2
   - Regex:           '.*'
     Priority:        1
   - Regex:           '.*'
     Priority:        1
-  - Regex:           '^<.*\.h>'
-    Priority:        2
 IncludeIsMainRegex: '(Test)?$'
 IndentCaseLabels: false
 IndentWidth:     4
 IncludeIsMainRegex: '(Test)?$'
 IndentCaseLabels: false
 IndentWidth:     4
@@ -106,5 +109,7 @@ SpacesInSquareBrackets: false
 Standard:        Cpp11
 TabWidth:        8
 UseTab:          Never
 Standard:        Cpp11
 TabWidth:        8
 UseTab:          Never
+---
+Language: ObjC
+PointerAlignment: Right
 ...
 ...
-
index 3db8ac9ba2e2e67da9ff965f5368ef287ca03720..cdc06ecd48c6bf39aa31f5f5632c002618a92695 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2021-10-20  Kimmo Kinnunen  <kkinnunen@apple.com>
+
+        Add ObjC as supported .clang-format language
+        https://bugs.webkit.org/show_bug.cgi?id=230401
+
+        Reviewed by Jonathan Bedard.
+
+        Add ObjC and change few properties useful
+        for ObjC formatting.
+
+        * .clang-format:
+
 2021-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [WPE] Reenable -fvisibility=hidden and -fvisibility-inlines-hidden
 2021-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [WPE] Reenable -fvisibility=hidden and -fvisibility-inlines-hidden