clang-format: Disable formatting by default
authorKonstantin Seurer <konstantin.seurer@gmail.com>
Sat, 12 Aug 2023 08:53:39 +0000 (10:53 +0200)
committerKonstantin Seurer <konstantin.seurer@gmail.com>
Sun, 13 Aug 2023 14:48:49 +0000 (16:48 +0200)
This should make `git clang-format` usable for patches that modify
clang formatted and manually formatted code.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9492
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24645>

15 files changed:
src/.clang-format
src/amd/compiler/.clang-format
src/amd/vulkan/.clang-format
src/amd/vulkan/bvh/.clang-format
src/asahi/.clang-format
src/compiler/nir/.clang-format
src/egl/.clang-format
src/freedreno/.clang-format
src/freedreno/vulkan/.clang-format
src/gallium/drivers/d3d12/.clang-format
src/gallium/drivers/i915/.clang-format
src/gallium/drivers/r600/sfn/.clang-format
src/panfrost/.clang-format
src/util/perf/.clang-format
src/virtio/vulkan/.clang-format

index bda295b..5f6a4c1 100644 (file)
@@ -311,3 +311,10 @@ ForEachMacros:
   - pan_foreach_instr_in_block_rev
   - pan_foreach_predecessor
   - pan_foreach_successor
+
+# Disable clang formatting by default. Drivers that use clang-format
+# inherit from this .clang-format file and re-enable formatting:
+#
+# DisableFormat: false
+#
+DisableFormat: true
index dc1fd83..6db4906 100644 (file)
@@ -1,5 +1,6 @@
 
 BasedOnStyle: InheritParentConfig
+DisableFormat: false
 
 ColumnLimit: 100
 
index 658c071..89b21c2 100644 (file)
@@ -1,3 +1,4 @@
 BasedOnStyle: InheritParentConfig
+DisableFormat: false
 
 ColumnLimit: 120
index 5a6f891..1b8c74f 100644 (file)
@@ -2,6 +2,7 @@
 # SPDX-License-Identifier: MIT
 
 BasedOnStyle: InheritParentConfig
+DisableFormat: false
 
 TypenameMacros:
   - REF
index b7f6d08..d974a05 100644 (file)
@@ -1,5 +1,6 @@
 
 BasedOnStyle: InheritParentConfig
+DisableFormat: false
 
 AlignConsecutiveBitFields: true
 ColumnLimit: 80
index c32cf21..087b5d8 100644 (file)
@@ -1,4 +1,5 @@
 BasedOnStyle: InheritParentConfig
+DisableFormat: false
 
 ColumnLimit: 0
 Cpp11BracedListStyle: false
index 8beedb5..eb64970 100644 (file)
@@ -1,4 +1,5 @@
 BasedOnStyle: InheritParentConfig
+DisableFormat: false
 
 ColumnLimit: 80
 AlwaysBreakAfterReturnType: All
index 3036a9d..44e7d5d 100644 (file)
@@ -1,5 +1,6 @@
 
 BasedOnStyle: InheritParentConfig
+DisableFormat: false
 
 AlignConsecutiveBitFields: true
 ColumnLimit: 80
index 1535490..f7f9e57 100644 (file)
@@ -1,5 +1,6 @@
 
 BasedOnStyle: InheritParentConfig
+DisableFormat: false
 
 AlwaysBreakAfterReturnType: TopLevel
 BinPackParameters: false
index 5cffedc..df40422 100644 (file)
@@ -1,5 +1,6 @@
 
 BasedOnStyle: InheritParentConfig
+DisableFormat: false
 
 ColumnLimit: 120
 SortIncludes: false
index bbfb4e8..f60c7e4 100644 (file)
@@ -1,4 +1,5 @@
 
 BasedOnStyle: InheritParentConfig
+DisableFormat: false
 
 ColumnLimit: 80
index 82398b0..98865be 100644 (file)
@@ -1,5 +1,6 @@
 
 BasedOnStyle: InheritParentConfig
+DisableFormat: false
 
 AlwaysBreakAfterReturnType: TopLevel
 AllowShortEnumsOnASingleLine: false
index b7f6d08..d974a05 100644 (file)
@@ -1,5 +1,6 @@
 
 BasedOnStyle: InheritParentConfig
+DisableFormat: false
 
 AlignConsecutiveBitFields: true
 ColumnLimit: 80
index 7bdaa22..11f7a8e 100644 (file)
@@ -1,5 +1,6 @@
 
 BasedOnStyle: InheritParentConfig
+DisableFormat: false
 
 BinPackParameters: false
 
index 48aba35..4fa2712 100644 (file)
@@ -1,5 +1,6 @@
 
 BasedOnStyle: InheritParentConfig
+DisableFormat: false
 
 AlwaysBreakAfterReturnType: TopLevel
 BinPackParameters: false