[gdk-pixbuf/static-analysis] Add more options to the Clang formatter
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf/static-analysis] Add more options to the Clang formatter
- Date: Tue, 10 Nov 2020 02:05:05 +0000 (UTC)
commit 3e5d13cd091a6b274dd79ceb506759b776334298
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Nov 10 01:49:25 2020 +0000
Add more options to the Clang formatter
We especially want the indentation width to be 8 spaces, not 2.
.clang-format | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/.clang-format b/.clang-format
index 13fd0fbd4..28eb6a13f 100644
--- a/.clang-format
+++ b/.clang-format
@@ -1,9 +1,22 @@
# See https://wiki.apertis.org/Guidelines/Coding_conventions#Code_formatting
-BasedOnStyle: GNU
+Language: Cpp
+BasedOnStyle:
+IndentWidth: 8
AlwaysBreakAfterDefinitionReturnType: All
-BreakBeforeBinaryOperators: None
+BreakBeforeBinaryOperators: true
BinPackParameters: false
SpaceAfterCStyleCast: true
+IndentCaseLabels: false
+IndentCaseBlocks: false
+BraceWrapping: Custom
+ AfterCaseLabel: false
+ AfterEnum: true
+ AfterFunction: true
+ AfterStruct: true
+ AfterUnion: true
+ BeforeElse: false
+ BeforeWhile: false
+ IndentBraces: false
# Our column limit is actually 80, but setting that results in clang-format
# making a lot of dubious hanging-indent choices; disable it and assume the
# developer will line wrap appropriately. clang-format will still check
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]