summaryrefslogtreecommitdiff
path: root/src
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 /src
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 'src')
-rw-r--r--src/crow_test.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/crow_test.cpp b/src/crow_test.cpp
index 0df05d2ad7..1f8360f01c 100644
--- a/src/crow_test.cpp
+++ b/src/crow_test.cpp
@@ -327,11 +327,11 @@ TEST(Crow, http_method)
BMCWEB_ROUTE(app, "/").methods(boost::beast::http::verb::post,
boost::beast::http::verb::get)(
[](const Request& req) {
- if (req.method() == boost::beast::http::verb::get)
- return "2";
- else
- return "1";
- });
+ if (req.method() == boost::beast::http::verb::get)
+ return "2";
+ else
+ return "1";
+ });
BMCWEB_ROUTE(app, "/get_only")
.methods(boost::beast::http::verb::get)(