summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-05-31 18:59:27 +0300
committerEd Tanous <ed@tanous.net>2022-06-01 19:10:35 +0300
commit002d39b4a7a5ed7166e2acad84e0943c3def9492 (patch)
tree4307dd5161ec9779d59308a9b933e408cc2c6ca7 /.clang-format
parent62c416fb0d2f62e09d7f60754ff359ac2389e749 (diff)
downloadbmcweb-002d39b4a7a5ed7166e2acad84e0943c3def9492.tar.xz
Try to fix the lambda formatting issue
clang-tidy has a setting, LambdaBodyIndentation, which it says: "For callback-heavy code, it may improve readability to have the signature indented two levels and to use OuterScope." bmcweb is very callback heavy code. Try to enable it and see if that improves things. There are many cases where the length of a lambda call will change, and reindent the entire lambda function. This is really bad for code reviews, as it's difficult to see the lines changed. This commit should resolve it. This does have the downside of reindenting a lot of functions, which is unfortunate, but probably worth it in the long run. All changes except for the .clang-format file were made by the robot. Tested: Code compiles, whitespace changes only. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ib4aa2f1391fada981febd25b67dcdb9143827f43
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format1
1 files changed, 1 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
index cab313967c..be651e775e 100644
--- a/.clang-format
+++ b/.clang-format
@@ -81,6 +81,7 @@ MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
+LambdaBodyIndentation: OuterScope
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true