From 002d39b4a7a5ed7166e2acad84e0943c3def9492 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Tue, 31 May 2022 08:59:27 -0700 Subject: 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 Change-Id: Ib4aa2f1391fada981febd25b67dcdb9143827f43 --- src/crow_test.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') 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)( -- cgit v1.2.3