diff --git a/.clang-format b/.clang-format
index be651e7..d92a3f1 100644
--- a/.clang-format
+++ b/.clang-format
@@ -6,12 +6,14 @@
 AlignConsecutiveAssignments: false
 AlignConsecutiveDeclarations: false
 AlignEscapedNewlines: Right
-AlignOperands:   true
-AlignTrailingComments: true
+AlignOperands:  Align
+AlignTrailingComments:
+  Kind: Always
+  OverEmptyLines: 1
 AllowAllParametersOfDeclarationOnNextLine: true
-AllowShortBlocksOnASingleLine: false
+AllowShortBlocksOnASingleLine: Empty
 AllowShortCaseLabelsOnASingleLine: false
-AllowShortFunctionsOnASingleLine: None
+AllowShortFunctionsOnASingleLine: Empty
 AllowShortIfStatementsOnASingleLine: false
 AllowShortLoopsOnASingleLine: false
 AlwaysBreakAfterReturnType: None
@@ -36,6 +38,7 @@
   SplitEmptyFunction:   false
   SplitEmptyRecord:     false
   SplitEmptyNamespace:  false
+BreakAfterAttributes: Never
 BreakBeforeBinaryOperators: None
 BreakBeforeBraces: Custom
 BreakBeforeTernaryOperators: true
@@ -49,6 +52,7 @@
 ConstructorInitializerIndentWidth: 4
 ContinuationIndentWidth: 4
 Cpp11BracedListStyle: true
+DeriveLineEnding: false
 DerivePointerAlignment: false
 PointerAlignment: Left
 DisableFormat:   false
@@ -74,24 +78,33 @@
   - Regex:           '.*'
     Priority:        6
 IndentCaseLabels: true
+IndentRequiresClause: true
 IndentWidth:     4
 IndentWrappedFunctionNames: true
-KeepEmptyLinesAtTheStartOfBlocks: true
+InsertNewlineAtEOF: true
+KeepEmptyLinesAtTheStartOfBlocks: false
+LambdaBodyIndentation: OuterScope
+LineEnding: LF
 MacroBlockBegin: ''
 MacroBlockEnd:   ''
 MaxEmptyLinesToKeep: 1
 NamespaceIndentation: None
-LambdaBodyIndentation: OuterScope
 ObjCBlockIndentWidth: 2
 ObjCSpaceAfterProperty: false
 ObjCSpaceBeforeProtocolList: true
+PenaltyBreakAssignment: 25
 PenaltyBreakBeforeFirstCallParameter: 19
 PenaltyBreakComment: 300
 PenaltyBreakFirstLessLess: 120
 PenaltyBreakString: 1000
 PenaltyExcessCharacter: 1000000
 PenaltyReturnTypeOnItsOwnLine: 60
+PenaltyIndentedWhitespace: 0
+QualifierAlignment: Left
+ReferenceAlignment: Left
 ReflowComments:  true
+RequiresClausePosition: OwnLine
+RequiresExpressionIndentation: Keyword
 SortIncludes:    true
 SortUsingDeclarations: true
 SpaceAfterCStyleCast: false
diff --git a/http/app.hpp b/http/app.hpp
index 60c2215..d47cd89 100644
--- a/http/app.hpp
+++ b/http/app.hpp
@@ -116,8 +116,8 @@
         }
         else
         {
-            sslServer =
-                std::make_unique<ssl_server_t>(this, socketFd, sslContext, io);
+            sslServer = std::make_unique<ssl_server_t>(this, socketFd,
+                                                       sslContext, io);
         }
         sslServer->run();
 
diff --git a/http/http_client.hpp b/http/http_client.hpp
index 4201499..8161eb1 100644
--- a/http/http_client.hpp
+++ b/http/http_client.hpp
@@ -536,7 +536,6 @@
     void afterSslShutdown(const std::shared_ptr<ConnectionInfo>& /*self*/,
                           bool retry, const boost::system::error_code& ec)
     {
-
         if (ec)
         {
             BMCWEB_LOG_ERROR << host << ":" << std::to_string(port)
diff --git a/http/http_connection.hpp b/http/http_connection.hpp
index 47f9432..c8ae1fd 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
@@ -45,8 +45,8 @@
 static int connectionCount = 0;
 
 // request body limit size set by the bmcwebHttpReqBodyLimitMb option
-constexpr uint64_t httpReqBodyLimit =
-    1024UL * 1024UL * bmcwebHttpReqBodyLimitMb;
+constexpr uint64_t httpReqBodyLimit = 1024UL * 1024UL *
+                                      bmcwebHttpReqBodyLimitMb;
 
 constexpr uint64_t loggedOutPostBodyLimit = 4096;
 
diff --git a/http/http_response.hpp b/http/http_response.hpp
index 5cbdb28..2af12c9 100644
--- a/http/http_response.hpp
+++ b/http/http_response.hpp
@@ -37,8 +37,7 @@
         stringResponse->set(key, value);
     }
 
-    Response() : stringResponse(response_type{})
-    {}
+    Response() : stringResponse(response_type{}) {}
 
     Response(Response&& res) noexcept :
         stringResponse(std::move(res.stringResponse)),
diff --git a/http/http_server.hpp b/http/http_server.hpp
index 3949a46..afa4514 100644
--- a/http/http_server.hpp
+++ b/http/http_server.hpp
@@ -67,8 +67,8 @@
         gmtime_r(&lastTimeT, &myTm);
 
         dateStr.resize(100);
-        size_t dateStrSz =
-            strftime(&dateStr[0], 99, "%a, %d %b %Y %H:%M:%S GMT", &myTm);
+        size_t dateStrSz = strftime(&dateStr[0], 99,
+                                    "%a, %d %b %Y %H:%M:%S GMT", &myTm);
         dateStr.resize(dateStrSz);
     }
 
diff --git a/http/logging.hpp b/http/logging.hpp
index 6543b73..ed0c7f7 100644
--- a/http/logging.hpp
+++ b/http/logging.hpp
@@ -65,8 +65,8 @@
 
         gmtime_r(&t, &myTm);
 
-        size_t sz =
-            strftime(date.data(), date.size(), "%Y-%m-%d %H:%M:%S", &myTm);
+        size_t sz = strftime(date.data(), date.size(), "%Y-%m-%d %H:%M:%S",
+                             &myTm);
         date.resize(sz);
         return date;
     }
@@ -93,7 +93,7 @@
 
     //
     template <typename T>
-    Logger& operator<<([[maybe_unused]] T const& value)
+    Logger& operator<<([[maybe_unused]] const T& value)
     {
         // Somewhere in the code we're implicitly casting an array to a
         // pointer in logging code. It's non-trivial to find,
diff --git a/http/routing.hpp b/http/routing.hpp
index 18d3c2a..5bf6902 100644
--- a/http/routing.hpp
+++ b/http/routing.hpp
@@ -34,8 +34,7 @@
 class BaseRule
 {
   public:
-    explicit BaseRule(const std::string& thisRule) : rule(thisRule)
-    {}
+    explicit BaseRule(const std::string& thisRule) : rule(thisRule) {}
 
     virtual ~BaseRule() = default;
 
@@ -183,8 +182,7 @@
     template <typename Req, typename... Args>
     struct ReqHandlerWrapper
     {
-        explicit ReqHandlerWrapper(Func fIn) : f(std::move(fIn))
-        {}
+        explicit ReqHandlerWrapper(Func fIn) : f(std::move(fIn)) {}
 
         void operator()(const Request& req,
                         const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -284,11 +282,9 @@
     using self_t = WebSocketRule;
 
   public:
-    explicit WebSocketRule(const std::string& ruleIn) : BaseRule(ruleIn)
-    {}
+    explicit WebSocketRule(const std::string& ruleIn) : BaseRule(ruleIn) {}
 
-    void validate() override
-    {}
+    void validate() override {}
 
     void handle(const Request& /*req*/,
                 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -453,8 +449,7 @@
 class DynamicRule : public BaseRule, public RuleParameterTraits<DynamicRule>
 {
   public:
-    explicit DynamicRule(const std::string& ruleIn) : BaseRule(ruleIn)
-    {}
+    explicit DynamicRule(const std::string& ruleIn) : BaseRule(ruleIn) {}
 
     void validate() override
     {
@@ -514,8 +509,7 @@
   public:
     using self_t = TaggedRule<Args...>;
 
-    explicit TaggedRule(const std::string& ruleIn) : BaseRule(ruleIn)
-    {}
+    explicit TaggedRule(const std::string& ruleIn) : BaseRule(ruleIn) {}
 
     void validate() override
     {
@@ -584,8 +578,7 @@
         }
     };
 
-    Trie() : nodes(1)
-    {}
+    Trie() : nodes(1) {}
 
   private:
     void optimizeNode(Node* node)
@@ -1015,8 +1008,8 @@
             // Make sure it's safe to deference the array at that index
             static_assert(maxVerbIndex <
                           std::tuple_size_v<decltype(perMethods)>);
-            FindRoute route =
-                findRouteByIndex(req.url().encoded_path(), perMethodIndex);
+            FindRoute route = findRouteByIndex(req.url().encoded_path(),
+                                               perMethodIndex);
             if (route.rule == nullptr)
             {
                 continue;
@@ -1246,8 +1239,8 @@
             // route
             if (foundRoute.allowHeader.empty())
             {
-                foundRoute.route =
-                    findRouteByIndex(req.url().encoded_path(), notFoundIndex);
+                foundRoute.route = findRouteByIndex(req.url().encoded_path(),
+                                                    notFoundIndex);
             }
             else
             {
@@ -1260,7 +1253,6 @@
         // Fill in the allow header if it's valid
         if (!foundRoute.allowHeader.empty())
         {
-
             asyncResp->res.addHeader(boost::beast::http::field::allow,
                                      foundRoute.allowHeader);
         }
@@ -1332,8 +1324,7 @@
         Trie trie;
         // rule index 0 has special meaning; preallocate it to avoid
         // duplication.
-        PerMethod() : rules(1)
-        {}
+        PerMethod() : rules(1) {}
     };
 
     std::array<PerMethod, methodNotAllowedIndex + 1> perMethods;
diff --git a/http/utility.hpp b/http/utility.hpp
index 75c84c2..7a85519 100644
--- a/http/utility.hpp
+++ b/http/utility.hpp
@@ -123,8 +123,8 @@
             {
                 return 0;
             }
-            std::string_view tag =
-                url.substr(urlSegmentIndex, urlIndex + 1 - urlSegmentIndex);
+            std::string_view tag = url.substr(urlSegmentIndex,
+                                              urlIndex + 1 - urlSegmentIndex);
 
             // Note, this is a really lame way to do std::pow(6, paramIndex)
             // std::pow doesn't work in constexpr in clang.
diff --git a/http/websocket.hpp b/http/websocket.hpp
index 8774200..e61f58b 100644
--- a/http/websocket.hpp
+++ b/http/websocket.hpp
@@ -27,8 +27,7 @@
 struct Connection : std::enable_shared_from_this<Connection>
 {
   public:
-    explicit Connection(const crow::Request& reqIn) : req(reqIn.req)
-    {}
+    explicit Connection(const crow::Request& reqIn) : req(reqIn.req) {}
 
     Connection(const Connection&) = delete;
     Connection(Connection&&) = delete;
diff --git a/include/async_resp.hpp b/include/async_resp.hpp
index d7f5819..eafaaca 100644
--- a/include/async_resp.hpp
+++ b/include/async_resp.hpp
@@ -16,8 +16,7 @@
 {
   public:
     AsyncResp() = default;
-    explicit AsyncResp(crow::Response&& resIn) : res(std::move(resIn))
-    {}
+    explicit AsyncResp(crow::Response&& resIn) : res(std::move(resIn)) {}
 
     AsyncResp(const AsyncResp&) = delete;
     AsyncResp(AsyncResp&&) = delete;
diff --git a/include/authentication.hpp b/include/authentication.hpp
index 7110034..18e7822 100644
--- a/include/authentication.hpp
+++ b/include/authentication.hpp
@@ -146,8 +146,8 @@
     {
         endIndex = cookieValue.size();
     }
-    std::string_view authKey =
-        cookieValue.substr(startIndex, endIndex - startIndex);
+    std::string_view authKey = cookieValue.substr(startIndex,
+                                                  endIndex - startIndex);
 
     std::shared_ptr<persistent_data::UserSession> sessionOut =
         persistent_data::SessionStore::getInstance().loginSessionByToken(
diff --git a/include/dbus_utility.hpp b/include/dbus_utility.hpp
index b278882..ba3e5fa 100644
--- a/include/dbus_utility.hpp
+++ b/include/dbus_utility.hpp
@@ -125,7 +125,7 @@
 
     std::filesystem::path p1(path);
     int count = -1;
-    for (auto const& element : p1)
+    for (const auto& element : p1)
     {
         if (element.has_filename())
         {
diff --git a/include/hostname_monitor.hpp b/include/hostname_monitor.hpp
index ed719d5..fd49b02 100644
--- a/include/hostname_monitor.hpp
+++ b/include/hostname_monitor.hpp
@@ -75,9 +75,9 @@
     const int maxKeySize = 256;
     std::array<char, maxKeySize> cnBuffer{};
 
-    int cnLength =
-        X509_NAME_get_text_by_NID(X509_get_subject_name(cert), NID_commonName,
-                                  cnBuffer.data(), cnBuffer.size());
+    int cnLength = X509_NAME_get_text_by_NID(X509_get_subject_name(cert),
+                                             NID_commonName, cnBuffer.data(),
+                                             cnBuffer.size());
     if (cnLength == -1)
     {
         BMCWEB_LOG_ERROR << "Failed to read NID_commonName";
diff --git a/include/human_sort.hpp b/include/human_sort.hpp
index 7ab326d..5cb6e56 100644
--- a/include/human_sort.hpp
+++ b/include/human_sort.hpp
@@ -24,7 +24,6 @@
 
 inline int alphanumComp(std::string_view left, std::string_view right)
 {
-
     std::string_view::const_iterator l = left.begin();
     std::string_view::const_iterator r = right.begin();
 
diff --git a/include/ibm/locks.hpp b/include/ibm/locks.hpp
index fd27ef9..99b9cc3 100644
--- a/include/ibm/locks.hpp
+++ b/include/ibm/locks.hpp
@@ -187,7 +187,6 @@
 
 inline RcGetLockList Lock::getLockList(const ListOfSessionIds& listSessionId)
 {
-
     std::vector<std::pair<uint32_t, LockRequests>> lockList;
 
     if (!lockTable.empty())
@@ -241,7 +240,6 @@
 
 inline RcAcquireLock Lock::acquireLock(const LockRequests& lockRequestStructure)
 {
-
     // validate the lock request
 
     for (const auto& lockRecord : lockRequestStructure)
@@ -363,7 +361,6 @@
 
 inline bool Lock::isValidLockRequest(const LockRequest& refLockRecord)
 {
-
     // validate the locktype
 
     if (!((boost::equals(std::get<2>(refLockRecord), "Read") ||
@@ -392,7 +389,6 @@
 
     for (const auto& p : std::get<4>(refLockRecord))
     {
-
         // validate the lock flags
         // Allowed lockflags are locksame,lockall & dontlock
 
@@ -552,7 +548,6 @@
     uint32_t i = 0;
     for (const auto& p : std::get<4>(refLockRecord1))
     {
-
         // return conflict when any of them is try to lock all resources
         // under the current resource level.
         if (boost::equals(p.first, "LockAll") ||
diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp
index e1b7f83..51f5298 100644
--- a/include/ibm/management_console_rest.hpp
+++ b/include/ibm/management_console_rest.hpp
@@ -36,11 +36,11 @@
 constexpr size_t maxSaveareaDirSize =
     25000000; // Allow save area dir size to be max 25MB
 constexpr size_t minSaveareaFileSize =
-    100; // Allow save area file size of minimum 100B
+    100;      // Allow save area file size of minimum 100B
 constexpr size_t maxSaveareaFileSize =
-    500000; // Allow save area file size upto 500KB
+    500000;   // Allow save area file size upto 500KB
 constexpr size_t maxBroadcastMsgSize =
-    1000; // Allow Broadcast message size upto 1KB
+    1000;     // Allow Broadcast message size upto 1KB
 
 inline void handleFilePut(const crow::Request& req,
                           const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -323,8 +323,8 @@
         return;
     }
 
-    std::string contentDispositionParam =
-        "attachment; filename=\"" + fileID + "\"";
+    std::string contentDispositionParam = "attachment; filename=\"" + fileID +
+                                          "\"";
     asyncResp->res.addHeader(boost::beast::http::field::content_disposition,
                              contentDispositionParam);
     std::string fileData;
@@ -685,7 +685,6 @@
 
 inline void requestRoutes(App& app)
 {
-
     // allowed only for admin
     BMCWEB_ROUTE(app, "/ibm/v1/")
         .privileges({{"ConfigureComponents", "ConfigureManager"}})
diff --git a/include/login_routes.hpp b/include/login_routes.hpp
index 00debb5..122e741 100644
--- a/include/login_routes.hpp
+++ b/include/login_routes.hpp
@@ -37,8 +37,8 @@
         // Check if auth was provided by a payload
         if (contentType.starts_with("application/json"))
         {
-            loginCredentials =
-                nlohmann::json::parse(req.body(), nullptr, false);
+            loginCredentials = nlohmann::json::parse(req.body(), nullptr,
+                                                     false);
             if (loginCredentials.is_discarded())
             {
                 BMCWEB_LOG_DEBUG << "Bad json in request";
@@ -77,8 +77,8 @@
                         if (dataIt->size() == 2)
                         {
                             nlohmann::json::iterator userIt2 = dataIt->begin();
-                            nlohmann::json::iterator passIt2 =
-                                dataIt->begin() + 1;
+                            nlohmann::json::iterator passIt2 = dataIt->begin() +
+                                                               1;
                             looksLikePhosphorRest = true;
                             if (userIt2 != dataIt->end() &&
                                 passIt2 != dataIt->end())
@@ -235,8 +235,8 @@
         const auto& session = req.session;
         if (session != nullptr)
         {
-            asyncResp->res.jsonValue["data"] =
-                "User '" + session->username + "' logged out";
+            asyncResp->res.jsonValue["data"] = "User '" + session->username +
+                                               "' logged out";
             asyncResp->res.jsonValue["message"] = "200 OK";
             asyncResp->res.jsonValue["status"] = "ok";
 
diff --git a/include/multipart_parser.hpp b/include/multipart_parser.hpp
index adeeccb..abc1657 100644
--- a/include/multipart_parser.hpp
+++ b/include/multipart_parser.hpp
@@ -274,8 +274,8 @@
                     // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
                     const char* start = buffer + partDataMark;
                     size_t size = i - partDataMark;
-                    mime_fields.rbegin()->content +=
-                        std::string_view(start, size);
+                    mime_fields.rbegin()->content += std::string_view(start,
+                                                                      size);
                 }
                 index++;
             }
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index 5bdc4ec..82e3ecd 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -221,7 +221,6 @@
                 }
                 else
                 {
-
                     propertyJson = val;
                 }
                 },
@@ -344,7 +343,6 @@
                             }
                             else
                             {
-
                                 propertyJson = val;
                             }
                             },
@@ -1678,8 +1676,8 @@
         [objectPath, asyncResp](
             const boost::system::error_code& ec,
             const dbus::utility::MapperGetSubTreeResponse& objectNames) {
-        auto transaction =
-            std::make_shared<InProgressEnumerateData>(objectPath, asyncResp);
+        auto transaction = std::make_shared<InProgressEnumerateData>(objectPath,
+                                                                     asyncResp);
 
         transaction->subtree =
             std::make_shared<dbus::utility::MapperGetSubTreeResponse>(
@@ -2030,7 +2028,6 @@
                           const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                           std::string& objectPath)
 {
-
     // If accessing a single attribute, fill in and update objectPath,
     // otherwise leave destProperty blank
     std::string destProperty;
@@ -2572,8 +2569,8 @@
                 asyncResp->res.result(boost::beast::http::status::not_found);
                 return;
             }
-            std::string contentDispositionParam =
-                "attachment; filename=\"" + dumpFileName + "\"";
+            std::string contentDispositionParam = "attachment; filename=\"" +
+                                                  dumpFileName + "\"";
 
             asyncResp->res.addHeader(
                 boost::beast::http::field::content_disposition,
diff --git a/include/sessions.hpp b/include/sessions.hpp
index 99a1a0e..6bb6a7a 100644
--- a/include/sessions.hpp
+++ b/include/sessions.hpp
@@ -417,8 +417,7 @@
     AuthConfigMethods authMethodsConfig;
 
   private:
-    SessionStore() : timeoutInSeconds(1800)
-    {}
+    SessionStore() : timeoutInSeconds(1800) {}
 };
 
 } // namespace persistent_data
diff --git a/include/ssl_key_handler.hpp b/include/ssl_key_handler.hpp
index 73d0b83..7152841 100644
--- a/include/ssl_key_handler.hpp
+++ b/include/ssl_key_handler.hpp
@@ -21,8 +21,8 @@
 
 namespace ensuressl
 {
-constexpr char const* trustStorePath = "/etc/ssl/certs/authority";
-constexpr char const* x509Comment = "Generated from OpenBMC service";
+constexpr const char* trustStorePath = "/etc/ssl/certs/authority";
+constexpr const char* x509Comment = "Generated from OpenBMC service";
 static void initOpenssl();
 static EVP_PKEY* createEcKey();
 
@@ -144,8 +144,8 @@
                 }
             }
 #else
-            EVP_PKEY_CTX* pkeyCtx =
-                EVP_PKEY_CTX_new_from_pkey(nullptr, pkey, nullptr);
+            EVP_PKEY_CTX* pkeyCtx = EVP_PKEY_CTX_new_from_pkey(nullptr, pkey,
+                                                               nullptr);
 
             if (pkeyCtx == nullptr)
             {
@@ -158,7 +158,6 @@
             }
             else
             {
-
                 std::cerr << "Key not valid error number " << ERR_get_error()
                           << "\n";
             }
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
index 0b87555..3fc4133 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -245,8 +245,8 @@
         return -1;
     }
 
-    std::string msg =
-        redfish::registries::fillMessageArgs(messageArgs, message->message);
+    std::string msg = redfish::registries::fillMessageArgs(messageArgs,
+                                                           message->message);
     if (msg.empty())
     {
         return -1;
@@ -440,8 +440,8 @@
         msg["Name"] = "Event Log";
         msg["Events"] = logEntryArray;
 
-        std::string strMsg =
-            msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+        std::string strMsg = msg.dump(2, ' ', true,
+                                      nlohmann::json::error_handler_t::replace);
         return this->sendEvent(strMsg);
     }
 
@@ -509,8 +509,8 @@
         msg["Name"] = "Event Log";
         msg["Events"] = logEntryArray;
 
-        std::string strMsg =
-            msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+        std::string strMsg = msg.dump(2, ' ', true,
+                                      nlohmann::json::error_handler_t::replace);
         this->sendEvent(strMsg);
     }
 #endif
@@ -549,8 +549,8 @@
             msg["Context"] = customText;
         }
 
-        std::string strMsg =
-            msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+        std::string strMsg = msg.dump(2, ' ', true,
+                                      nlohmann::json::error_handler_t::replace);
         this->sendEvent(strMsg);
     }
 
@@ -883,7 +883,6 @@
     std::string addSubscription(const std::shared_ptr<Subscription>& subValue,
                                 const bool updateFile = true)
     {
-
         std::uniform_int_distribution<uint32_t> dist(0);
         bmcweb::OpenSSLGenerator gen;
 
@@ -1317,8 +1316,8 @@
         }
 
         // Watch redfish event log file for modifications.
-        fileWatchDesc =
-            inotify_add_watch(inotifyFd, redfishEventLogFile, IN_MODIFY);
+        fileWatchDesc = inotify_add_watch(inotifyFd, redfishEventLogFile,
+                                          IN_MODIFY);
         if (fileWatchDesc == -1)
         {
             BMCWEB_LOG_ERROR
diff --git a/redfish-core/include/gzfile.hpp b/redfish-core/include/gzfile.hpp
index 844932a..34bc151 100644
--- a/redfish-core/include/gzfile.hpp
+++ b/redfish-core/include/gzfile.hpp
@@ -97,8 +97,8 @@
 
         while (pos != std::string::npos)
         {
-            std::string logEntry =
-                bufferStr.substr(initialPos, pos - initialPos);
+            std::string logEntry = bufferStr.substr(initialPos,
+                                                    pos - initialPos);
             // Since there might be consecutive delimiters like "\r\n", we need
             // to filter empty strings.
             if (!logEntry.empty())
diff --git a/redfish-core/include/redfish_aggregator.hpp b/redfish-core/include/redfish_aggregator.hpp
index 9168cc5..896eb4a 100644
--- a/redfish-core/include/redfish_aggregator.hpp
+++ b/redfish-core/include/redfish_aggregator.hpp
@@ -815,8 +815,8 @@
         if (boost::iequals(contentType, "application/json") ||
             boost::iequals(contentType, "application/json; charset=utf-8"))
         {
-            nlohmann::json jsonVal =
-                nlohmann::json::parse(resp.body(), nullptr, false);
+            nlohmann::json jsonVal = nlohmann::json::parse(resp.body(), nullptr,
+                                                           false);
             if (jsonVal.is_discarded())
             {
                 BMCWEB_LOG_ERROR << "Error parsing satellite response as JSON";
@@ -879,8 +879,8 @@
         if (boost::iequals(contentType, "application/json") ||
             boost::iequals(contentType, "application/json; charset=utf-8"))
         {
-            nlohmann::json jsonVal =
-                nlohmann::json::parse(resp.body(), nullptr, false);
+            nlohmann::json jsonVal = nlohmann::json::parse(resp.body(), nullptr,
+                                                           false);
             if (jsonVal.is_discarded())
             {
                 BMCWEB_LOG_ERROR << "Error parsing satellite response as JSON";
@@ -1013,8 +1013,8 @@
             boost::iequals(contentType, "application/json; charset=utf-8"))
         {
             bool addedLinks = false;
-            nlohmann::json jsonVal =
-                nlohmann::json::parse(resp.body(), nullptr, false);
+            nlohmann::json jsonVal = nlohmann::json::parse(resp.body(), nullptr,
+                                                           false);
             if (jsonVal.is_discarded())
             {
                 BMCWEB_LOG_ERROR << "Error parsing satellite response as JSON";
diff --git a/redfish-core/include/utils/json_utils.hpp b/redfish-core/include/utils/json_utils.hpp
index 26b9a8a..774ab7c 100644
--- a/redfish-core/include/utils/json_utils.hpp
+++ b/redfish-core/include/utils/json_utils.hpp
@@ -505,8 +505,7 @@
     return result;
 }
 
-inline void packVariant(std::span<PerUnpack> /*toPack*/)
-{}
+inline void packVariant(std::span<PerUnpack> /*toPack*/) {}
 
 template <typename FirstType, typename... UnpackTypes>
 void packVariant(std::span<PerUnpack> toPack, std::string_view key,
diff --git a/redfish-core/include/utils/query_param.hpp b/redfish-core/include/utils/query_param.hpp
index 96885eb..e6ca9d3 100644
--- a/redfish-core/include/utils/query_param.hpp
+++ b/redfish-core/include/utils/query_param.hpp
@@ -916,9 +916,9 @@
             constexpr std::array<std::string_view, 5> reservedProperties = {
                 "@odata.id", "@odata.type", "@odata.context", "@odata.etag",
                 "error"};
-            bool reserved =
-                std::find(reservedProperties.begin(), reservedProperties.end(),
-                          it.key()) != reservedProperties.end();
+            bool reserved = std::find(reservedProperties.begin(),
+                                      reservedProperties.end(),
+                                      it.key()) != reservedProperties.end();
             if (reserved || (nextNode != nullptr && nextNode->isSelected()))
             {
                 it = nextIt;
diff --git a/redfish-core/include/utils/sw_utils.hpp b/redfish-core/include/utils/sw_utils.hpp
index 90048dd..7c746a0 100644
--- a/redfish-core/include/utils/sw_utils.hpp
+++ b/redfish-core/include/utils/sw_utils.hpp
@@ -110,7 +110,6 @@
                                      std::string, std::vector<std::string>>>>&
                      obj : subtree)
             {
-
                 sdbusplus::message::object_path path(obj.first);
                 std::string swId = path.filename();
                 if (swId.empty())
diff --git a/redfish-core/include/utils/time_utils.hpp b/redfish-core/include/utils/time_utils.hpp
index f4fb0c0..cb018ef 100644
--- a/redfish-core/include/utils/time_utils.hpp
+++ b/redfish-core/include/utils/time_utils.hpp
@@ -261,8 +261,8 @@
     z += 719468;
     IntType era = (z >= 0 ? z : z - 146096) / 146097;
     unsigned doe = static_cast<unsigned>(z - era * 146097); // [0, 146096]
-    unsigned yoe =
-        (doe - doe / 1460 + doe / 36524 - doe / 146096) / 365; // [0, 399]
+    unsigned yoe = (doe - doe / 1460 + doe / 36524 - doe / 146096) /
+                   365;                                     // [0, 399]
     IntType y = static_cast<IntType>(yoe) + era * 400;
     unsigned doy = doe - (365 * yoe + yoe / 4 - yoe / 100); // [0, 365]
     unsigned mp = (5 * doy + 2) / 153;                      // [0, 11]
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index a844b61..c9d4eb8 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -204,8 +204,8 @@
                                 const LDAPConfigData& confData,
                                 const std::string& ldapType)
 {
-    std::string service =
-        (ldapType == "LDAP") ? "LDAPService" : "ActiveDirectoryService";
+    std::string service = (ldapType == "LDAP") ? "LDAPService"
+                                               : "ActiveDirectoryService";
 
     nlohmann::json& ldap = jsonResponse[ldapType];
 
@@ -265,9 +265,8 @@
                         messages::internalError(asyncResp->res);
                         return;
                     }
-                    asyncResp->res
-                        .jsonValue[serverType]["RemoteRoleMapping"][index] =
-                        nullptr;
+                    asyncResp->res.jsonValue[serverType]["RemoteRoleMapping"]
+                                            [index] = nullptr;
                     },
                     ldapDbusService, roleMapObjData[index].first,
                     "xyz.openbmc_project.Object.Delete", "Delete");
@@ -361,8 +360,8 @@
             {
                 BMCWEB_LOG_DEBUG
                     << "setRoleMappingProperties: Creating new Object";
-                std::string pathString =
-                    "RemoteRoleMapping/" + std::to_string(index);
+                std::string pathString = "RemoteRoleMapping/" +
+                                         std::to_string(index);
 
                 if (!localRole)
                 {
@@ -423,7 +422,6 @@
 inline void getLDAPConfigData(const std::string& ldapType,
                               CallbackFunc&& callback)
 {
-
     constexpr std::array<std::string_view, 2> interfaces = {
         ldapEnableInterface, ldapConfigInterface};
 
@@ -509,7 +507,6 @@
                     }
                     else if (interface.first == ldapConfigInterfaceStr)
                     {
-
                         for (const auto& property : interface.second)
                         {
                             const std::string* strValue =
@@ -712,9 +709,8 @@
             messages::internalError(asyncResp->res);
             return;
         }
-        asyncResp->res
-            .jsonValue[ldapServerElementName]["Authentication"]["Username"] =
-            username;
+        asyncResp->res.jsonValue[ldapServerElementName]["Authentication"]
+                                ["Username"] = username;
         BMCWEB_LOG_DEBUG << "Updated the username";
         },
         ldapDbusService, ldapConfigObject, propertyInterface, "Set",
@@ -745,9 +741,8 @@
             messages::internalError(asyncResp->res);
             return;
         }
-        asyncResp->res
-            .jsonValue[ldapServerElementName]["Authentication"]["Password"] =
-            "";
+        asyncResp->res.jsonValue[ldapServerElementName]["Authentication"]
+                                ["Password"] = "";
         BMCWEB_LOG_DEBUG << "Updated the password";
         },
         ldapDbusService, ldapConfigObject, propertyInterface, "Set",
@@ -1588,8 +1583,8 @@
             if (userCanSeeAllAccounts || (thisUser == user && userCanSeeSelf))
             {
                 nlohmann::json::object_t member;
-                member["@odata.id"] =
-                    "/redfish/v1/AccountService/Accounts/" + user;
+                member["@odata.id"] = "/redfish/v1/AccountService/Accounts/" +
+                                      user;
                 memberArray.push_back(std::move(member));
             }
         }
@@ -2016,7 +2011,6 @@
 
 inline void requestAccountServiceRoutes(App& app)
 {
-
     BMCWEB_ROUTE(app, "/redfish/v1/AccountService/")
         .privileges(redfish::privileges::headAccountService)
         .methods(boost::beast::http::verb::head)(
diff --git a/redfish-core/lib/certificate_service.hpp b/redfish-core/lib/certificate_service.hpp
index cdeb210..3cb6a3f 100644
--- a/redfish-core/lib/certificate_service.hpp
+++ b/redfish-core/lib/certificate_service.hpp
@@ -24,23 +24,23 @@
 {
 namespace certs
 {
-constexpr char const* certInstallIntf = "xyz.openbmc_project.Certs.Install";
-constexpr char const* certReplaceIntf = "xyz.openbmc_project.Certs.Replace";
-constexpr char const* objDeleteIntf = "xyz.openbmc_project.Object.Delete";
-constexpr char const* certPropIntf = "xyz.openbmc_project.Certs.Certificate";
-constexpr char const* dbusPropIntf = "org.freedesktop.DBus.Properties";
-constexpr char const* dbusObjManagerIntf = "org.freedesktop.DBus.ObjectManager";
-constexpr char const* httpsServiceName =
+constexpr const char* certInstallIntf = "xyz.openbmc_project.Certs.Install";
+constexpr const char* certReplaceIntf = "xyz.openbmc_project.Certs.Replace";
+constexpr const char* objDeleteIntf = "xyz.openbmc_project.Object.Delete";
+constexpr const char* certPropIntf = "xyz.openbmc_project.Certs.Certificate";
+constexpr const char* dbusPropIntf = "org.freedesktop.DBus.Properties";
+constexpr const char* dbusObjManagerIntf = "org.freedesktop.DBus.ObjectManager";
+constexpr const char* httpsServiceName =
     "xyz.openbmc_project.Certs.Manager.Server.Https";
-constexpr char const* ldapServiceName =
+constexpr const char* ldapServiceName =
     "xyz.openbmc_project.Certs.Manager.Client.Ldap";
-constexpr char const* authorityServiceName =
+constexpr const char* authorityServiceName =
     "xyz.openbmc_project.Certs.Manager.Authority.Ldap";
-constexpr char const* baseObjectPath = "/xyz/openbmc_project/certs";
-constexpr char const* httpsObjectPath =
+constexpr const char* baseObjectPath = "/xyz/openbmc_project/certs";
+constexpr const char* httpsObjectPath =
     "/xyz/openbmc_project/certs/server/https";
-constexpr char const* ldapObjectPath = "/xyz/openbmc_project/certs/client/ldap";
-constexpr char const* authorityObjectPath =
+constexpr const char* ldapObjectPath = "/xyz/openbmc_project/certs/client/ldap";
+constexpr const char* authorityObjectPath =
     "/xyz/openbmc_project/certs/authority/ldap";
 } // namespace certs
 
@@ -517,8 +517,8 @@
                                        "bmc", "NetworkProtocol", "HTTPS",
                                        "Certificates", std::ref(id)))
     {
-        objectPath =
-            sdbusplus::message::object_path(certs::httpsObjectPath) / id;
+        objectPath = sdbusplus::message::object_path(certs::httpsObjectPath) /
+                     id;
         name = "HTTPS certificate";
         service = certs::httpsServiceName;
     }
@@ -526,8 +526,8 @@
                                             "AccountService", "LDAP",
                                             "Certificates", std::ref(id)))
     {
-        objectPath =
-            sdbusplus::message::object_path(certs::ldapObjectPath) / id;
+        objectPath = sdbusplus::message::object_path(certs::ldapObjectPath) /
+                     id;
         name = "LDAP certificate";
         service = certs::ldapServiceName;
     }
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index 9563290..e4e7b5a 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -429,8 +429,8 @@
                     const dbus::utility::ManagedObjectType& dbusData,
                     boost::container::flat_set<IPv6AddressData>& ipv6Config)
 {
-    const std::string ipPathStart =
-        "/xyz/openbmc_project/network/" + ethifaceId;
+    const std::string ipPathStart = "/xyz/openbmc_project/network/" +
+                                    ethifaceId;
 
     // Since there might be several IPv6 configurations aligned with
     // single ethernet interface, loop over all of them
@@ -527,8 +527,8 @@
                   const dbus::utility::ManagedObjectType& dbusData,
                   boost::container::flat_set<IPv4AddressData>& ipv4Config)
 {
-    const std::string ipPathStart =
-        "/xyz/openbmc_project/network/" + ethifaceId;
+    const std::string ipPathStart = "/xyz/openbmc_project/network/" +
+                                    ethifaceId;
 
     // Since there might be several IPv4 configurations aligned with
     // single ethernet interface, loop over all of them
@@ -917,8 +917,8 @@
     handleMTUSizePatch(const std::string& ifaceId, const size_t mtuSize,
                        const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
-    sdbusplus::message::object_path objPath =
-        "/xyz/openbmc_project/network/" + ifaceId;
+    sdbusplus::message::object_path objPath = "/xyz/openbmc_project/network/" +
+                                              ifaceId;
     crow::connections::systemBus->async_method_call(
         [asyncResp](const boost::system::error_code& ec) {
         if (ec)
@@ -1263,8 +1263,8 @@
 
     for (nlohmann::json& thisJson : input)
     {
-        std::string pathString =
-            "IPv4StaticAddresses/" + std::to_string(entryIdx);
+        std::string pathString = "IPv4StaticAddresses/" +
+                                 std::to_string(entryIdx);
 
         if (!thisJson.is_null() && !thisJson.empty())
         {
@@ -1379,8 +1379,8 @@
                 deleteAndCreateIPAddress(IpVersion::IpV4, ifaceId,
                                          nicIpEntry->id, prefixLength, *gw,
                                          *addr, asyncResp);
-                nicIpEntry =
-                    getNextStaticIpEntry(++nicIpEntry, ipv4Data.cend());
+                nicIpEntry = getNextStaticIpEntry(++nicIpEntry,
+                                                  ipv4Data.cend());
             }
             else
             {
@@ -1415,8 +1415,8 @@
             }
             if (nicIpEntry != ipv4Data.cend())
             {
-                nicIpEntry =
-                    getNextStaticIpEntry(++nicIpEntry, ipv4Data.cend());
+                nicIpEntry = getNextStaticIpEntry(++nicIpEntry,
+                                                  ipv4Data.cend());
             }
             entryIdx++;
         }
@@ -1461,8 +1461,8 @@
         getNextStaticIpEntry(ipv6Data.cbegin(), ipv6Data.cend());
     for (const nlohmann::json& thisJson : input)
     {
-        std::string pathString =
-            "IPv6StaticAddresses/" + std::to_string(entryIdx);
+        std::string pathString = "IPv6StaticAddresses/" +
+                                 std::to_string(entryIdx);
 
         if (!thisJson.is_null() && !thisJson.empty())
         {
@@ -1522,8 +1522,8 @@
                 deleteAndCreateIPAddress(IpVersion::IpV6, ifaceId,
                                          nicIpEntry->id, prefix, "", *addr,
                                          asyncResp);
-                nicIpEntry =
-                    getNextStaticIpEntry(++nicIpEntry, ipv6Data.cend());
+                nicIpEntry = getNextStaticIpEntry(++nicIpEntry,
+                                                  ipv6Data.cend());
             }
             else
             {
@@ -1557,8 +1557,8 @@
             }
             if (nicIpEntry != ipv6Data.cend())
             {
-                nicIpEntry =
-                    getNextStaticIpEntry(++nicIpEntry, ipv6Data.cend());
+                nicIpEntry = getNextStaticIpEntry(++nicIpEntry,
+                                                  ipv6Data.cend());
             }
             entryIdx++;
         }
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
index c418504..82004e0 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -162,7 +162,6 @@
 
 inline void requestRoutesSubmitTestEvent(App& app)
 {
-
     BMCWEB_ROUTE(
         app, "/redfish/v1/EventService/Actions/EventService.SubmitTestEvent/")
         .privileges(redfish::privileges::postEventService)
@@ -210,8 +209,8 @@
         for (const std::string& id : subscripIds)
         {
             nlohmann::json::object_t member;
-            member["@odata.id"] =
-                "/redfish/v1/EventService/Subscriptions/" + id;
+            member["@odata.id"] = "/redfish/v1/EventService/Subscriptions/" +
+                                  id;
             memberArray.push_back(std::move(member));
         }
         });
diff --git a/redfish-core/lib/fabric_adapters.hpp b/redfish-core/lib/fabric_adapters.hpp
index 1799159..be89fbc 100644
--- a/redfish-core/lib/fabric_adapters.hpp
+++ b/redfish-core/lib/fabric_adapters.hpp
@@ -25,7 +25,6 @@
                                crow::Response& res,
                                const std::string& adapterId)
 {
-
     if (ec.value() == boost::system::errc::io_error)
     {
         messages::resourceNotFound(res, "#FabricAdapter.v1_4_0.FabricAdapter",
diff --git a/redfish-core/lib/health.hpp b/redfish-core/lib/health.hpp
index 643ce7f..ef858a1 100644
--- a/redfish-core/lib/health.hpp
+++ b/redfish-core/lib/health.hpp
@@ -82,7 +82,6 @@
             // managers inventory is all the inventory, don't skip any
             if (!isManagersHealth && !isSelf)
             {
-
                 // We only want to look at this association if either the path
                 // of this association is an inventory item, or one of the
                 // endpoints in this association is a child
diff --git a/redfish-core/lib/hypervisor_system.hpp b/redfish-core/lib/hypervisor_system.hpp
index 1c27223..e524145 100644
--- a/redfish-core/lib/hypervisor_system.hpp
+++ b/redfish-core/lib/hypervisor_system.hpp
@@ -327,8 +327,8 @@
             return;
         }
 
-        bool found =
-            extractHypervisorInterfaceData(ethIfaceId, resp, ethData, ipv4Data);
+        bool found = extractHypervisorInterfaceData(ethIfaceId, resp, ethData,
+                                                    ipv4Data);
         if (!found)
         {
             BMCWEB_LOG_INFO << "Hypervisor Interface not found";
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 5159ae1..aeb1d19 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -56,14 +56,14 @@
 namespace redfish
 {
 
-constexpr char const* crashdumpObject = "com.intel.crashdump";
-constexpr char const* crashdumpPath = "/com/intel/crashdump";
-constexpr char const* crashdumpInterface = "com.intel.crashdump";
-constexpr char const* deleteAllInterface =
+constexpr const char* crashdumpObject = "com.intel.crashdump";
+constexpr const char* crashdumpPath = "/com/intel/crashdump";
+constexpr const char* crashdumpInterface = "com.intel.crashdump";
+constexpr const char* deleteAllInterface =
     "xyz.openbmc_project.Collection.DeleteAll";
-constexpr char const* crashdumpOnDemandInterface =
+constexpr const char* crashdumpOnDemandInterface =
     "com.intel.crashdump.OnDemand";
-constexpr char const* crashdumpTelemetryInterface =
+constexpr const char* crashdumpTelemetryInterface =
     "com.intel.crashdump.Telemetry";
 
 enum class DumpCreationProgress
@@ -274,8 +274,8 @@
         }
     }
     // Timestamp has no index
-    auto [ptr, ec] =
-        std::from_chars(tsStr.data(), tsStr.data() + tsStr.size(), timestamp);
+    auto [ptr, ec] = std::from_chars(tsStr.data(), tsStr.data() + tsStr.size(),
+                                     timestamp);
     if (ec != std::errc())
     {
         messages::resourceNotFound(asyncResp->res, "LogEntry", entryID);
@@ -489,8 +489,8 @@
             "#LogEntryCollection.LogEntryCollection";
         asyncResp->res.jsonValue["@odata.id"] = std::move(odataIdStr);
         asyncResp->res.jsonValue["Name"] = dumpType + " Dump Entries";
-        asyncResp->res.jsonValue["Description"] =
-            "Collection of " + dumpType + " Dump Entries";
+        asyncResp->res.jsonValue["Description"] = "Collection of " + dumpType +
+                                                  " Dump Entries";
 
         nlohmann::json& entriesArray = asyncResp->res.jsonValue["Members"];
         entriesArray = nlohmann::json::array();
@@ -552,16 +552,16 @@
             if (dumpType == "BMC")
             {
                 thisEntry["DiagnosticDataType"] = "Manager";
-                thisEntry["AdditionalDataURI"] =
-                    entriesPath + entryID + "/attachment";
+                thisEntry["AdditionalDataURI"] = entriesPath + entryID +
+                                                 "/attachment";
                 thisEntry["AdditionalDataSizeBytes"] = size;
             }
             else if (dumpType == "System")
             {
                 thisEntry["DiagnosticDataType"] = "OEM";
                 thisEntry["OEMDiagnosticDataType"] = "System";
-                thisEntry["AdditionalDataURI"] =
-                    entriesPath + entryID + "/attachment";
+                thisEntry["AdditionalDataURI"] = entriesPath + entryID +
+                                                 "/attachment";
                 thisEntry["AdditionalDataSizeBytes"] = size;
             }
             entriesArray.push_back(std::move(thisEntry));
@@ -854,8 +854,8 @@
             nlohmann::json retMessage = messages::success();
             taskData->messages.emplace_back(retMessage);
 
-            std::string headerLoc =
-                "Location: " + dumpEntryPath + http_helpers::urlEncode(dumpId);
+            std::string headerLoc = "Location: " + dumpEntryPath +
+                                    http_helpers::urlEncode(dumpId);
             taskData->payload->httpHeaders.emplace_back(std::move(headerLoc));
 
             BMCWEB_LOG_DEBUG << createdObjPath.str
@@ -1424,8 +1424,8 @@
                 firstEntry = false;
 
                 nlohmann::json::object_t bmcLogEntry;
-                LogParseError status =
-                    fillEventLogEntryJson(idStr, logEntry, bmcLogEntry);
+                LogParseError status = fillEventLogEntryJson(idStr, logEntry,
+                                                             bmcLogEntry);
                 if (status == LogParseError::messageIdNotInRegistry)
                 {
                     continue;
@@ -3898,9 +3898,9 @@
             endCount = entryCount + postcode.size();
             if (skip < endCount && (top + skip) > entryCount)
             {
-                uint64_t thisBootSkip =
-                    std::max(static_cast<uint64_t>(skip), entryCount) -
-                    entryCount;
+                uint64_t thisBootSkip = std::max(static_cast<uint64_t>(skip),
+                                                 entryCount) -
+                                        entryCount;
                 uint64_t thisBootTop =
                     std::min(static_cast<uint64_t>(top + skip), endCount) -
                     entryCount;
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index 6e1427b..134ecb6 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -163,7 +163,6 @@
  */
 inline void requestRoutesManagerResetToDefaultsAction(App& app)
 {
-
     /**
      * Function handles ResetToDefaults POST method request.
      *
@@ -288,7 +287,6 @@
                      const std::vector<std::string>& supportedProfiles,
                      const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
-
     crow::connections::systemBus->async_method_call(
         [asyncResp, currentProfile, supportedProfiles](
             const boost::system::error_code& ec,
@@ -440,7 +438,6 @@
                 // pid and fans are off the same configuration
                 else if (intfPair.first == pidConfigurationIface)
                 {
-
                     if (classPtr == nullptr)
                     {
                         BMCWEB_LOG_ERROR << "Pid Class Field illegal";
@@ -569,7 +566,6 @@
                     if (intfPair.first == pidConfigurationIface ||
                         intfPair.first == stepwiseConfigurationIface)
                     {
-
                         if (propertyPair.first == "Zones")
                         {
                             const std::vector<std::string>* inputs =
@@ -782,7 +778,6 @@
     dbus::utility::DBusPropertiesMap& output, std::string& chassis,
     const std::string& profile)
 {
-
     // common deleter
     if (it.value() == nullptr)
     {
@@ -1027,7 +1022,6 @@
 
         if (chassisContainer)
         {
-
             std::string chassisId;
             if (!redfish::json_util::readJson(*chassisContainer, response->res,
                                               "@odata.id", chassisId))
@@ -1116,7 +1110,6 @@
         {
             for (std::string& value : *inputs)
             {
-
                 std::replace(value.begin(), value.end(), '_', ' ');
             }
             output.emplace_back("Inputs", std::move(*inputs));
@@ -1328,12 +1321,10 @@
 
 struct SetPIDValues : std::enable_shared_from_this<SetPIDValues>
 {
-
     SetPIDValues(const std::shared_ptr<bmcweb::AsyncResp>& asyncRespIn,
                  nlohmann::json& data) :
         asyncResp(asyncRespIn)
     {
-
         std::optional<nlohmann::json> pidControllers;
         std::optional<nlohmann::json> fanControllers;
         std::optional<nlohmann::json> fanZones;
@@ -1508,12 +1499,12 @@
                 std::replace(dbusObjName.begin(), dbusObjName.end(), ' ', '_');
                 BMCWEB_LOG_DEBUG << "looking for " << name;
 
-                auto pathItr =
-                    std::find_if(managedObj.begin(), managedObj.end(),
-                                 [&dbusObjName](const auto& obj) {
+                auto pathItr = std::find_if(managedObj.begin(),
+                                            managedObj.end(),
+                                            [&dbusObjName](const auto& obj) {
                     return boost::algorithm::ends_with(obj.first.str,
                                                        "/" + dbusObjName);
-                    });
+                });
                 dbus::utility::DBusPropertiesMap output;
 
                 output.reserve(16); // The pid interface length
@@ -2107,7 +2098,6 @@
                 if (interfaceName ==
                     "xyz.openbmc_project.Inventory.Decorator.Asset")
                 {
-
                     sdbusplus::asio::getAllProperties(
                         *crow::connections::systemBus, connectionName, path,
                         "xyz.openbmc_project.Inventory.Decorator.Asset",
diff --git a/redfish-core/lib/memory.hpp b/redfish-core/lib/memory.hpp
index 4478472..c57d387 100644
--- a/redfish-core/lib/memory.hpp
+++ b/redfish-core/lib/memory.hpp
@@ -243,15 +243,14 @@
 
     if (volatileSizeInKiB != nullptr)
     {
-
         aResp->res.jsonValue[jsonPtr]["VolatileSizeMiB"] =
             (*volatileSizeInKiB) >> 10;
     }
 
     if (pmSizeInKiB != nullptr)
     {
-        aResp->res.jsonValue[jsonPtr]["NonVolatileSizeMiB"] =
-            (*pmSizeInKiB) >> 10;
+        aResp->res.jsonValue[jsonPtr]["NonVolatileSizeMiB"] = (*pmSizeInKiB) >>
+                                                              10;
     }
 
     if (cacheSizeInKB != nullptr)
@@ -364,30 +363,26 @@
 
     if (dataLockCapable != nullptr)
     {
-        aResp->res
-            .jsonValue[jsonPtr]["SecurityCapabilities"]["DataLockCapable"] =
-            *dataLockCapable;
+        aResp->res.jsonValue[jsonPtr]["SecurityCapabilities"]
+                            ["DataLockCapable"] = *dataLockCapable;
     }
 
     if (passphraseCapable != nullptr)
     {
-        aResp->res
-            .jsonValue[jsonPtr]["SecurityCapabilities"]["PassphraseCapable"] =
-            *passphraseCapable;
+        aResp->res.jsonValue[jsonPtr]["SecurityCapabilities"]
+                            ["PassphraseCapable"] = *passphraseCapable;
     }
 
     if (maxPassphraseCount != nullptr)
     {
-        aResp->res
-            .jsonValue[jsonPtr]["SecurityCapabilities"]["MaxPassphraseCount"] =
-            *maxPassphraseCount;
+        aResp->res.jsonValue[jsonPtr]["SecurityCapabilities"]
+                            ["MaxPassphraseCount"] = *maxPassphraseCount;
     }
 
     if (passphraseLockLimit != nullptr)
     {
-        aResp->res
-            .jsonValue[jsonPtr]["SecurityCapabilities"]["PassphraseLockLimit"] =
-            *passphraseLockLimit;
+        aResp->res.jsonValue[jsonPtr]["SecurityCapabilities"]
+                            ["PassphraseLockLimit"] = *passphraseLockLimit;
     }
 }
 
@@ -593,9 +588,8 @@
 
     if (locationCode != nullptr)
     {
-        aResp->res
-            .jsonValue[jsonPtr]["Location"]["PartLocation"]["ServiceLabel"] =
-            *locationCode;
+        aResp->res.jsonValue[jsonPtr]["Location"]["PartLocation"]
+                            ["ServiceLabel"] = *locationCode;
     }
 
     getPersistentMemoryProperties(aResp, properties, jsonPtr);
diff --git a/redfish-core/lib/message_registries.hpp b/redfish-core/lib/message_registries.hpp
index 41464bc..907f6cf 100644
--- a/redfish-core/lib/message_registries.hpp
+++ b/redfish-core/lib/message_registries.hpp
@@ -115,8 +115,8 @@
     asyncResp->res.jsonValue["@odata.type"] =
         "#MessageRegistryFile.v1_1_0.MessageRegistryFile";
     asyncResp->res.jsonValue["Name"] = registry + " Message Registry File";
-    asyncResp->res.jsonValue["Description"] =
-        dmtf + registry + " Message Registry File Location";
+    asyncResp->res.jsonValue["Description"] = dmtf + registry +
+                                              " Message Registry File Location";
     asyncResp->res.jsonValue["Id"] = header->registryPrefix;
     asyncResp->res.jsonValue["Registry"] = header->id;
     nlohmann::json::array_t languages;
diff --git a/redfish-core/lib/metric_report_definition.hpp b/redfish-core/lib/metric_report_definition.hpp
index 2e97fa0..b184889 100644
--- a/redfish-core/lib/metric_report_definition.hpp
+++ b/redfish-core/lib/metric_report_definition.hpp
@@ -233,8 +233,8 @@
     {
         const std::vector<std::string>& uris = metric.second;
 
-        std::optional<IncorrectMetricUri> error =
-            getChassisSensorNode(uris, matched);
+        std::optional<IncorrectMetricUri> error = getChassisSensorNode(uris,
+                                                                       matched);
         if (error)
         {
             messages::propertyValueIncorrect(asyncResp->res, error->uri,
diff --git a/redfish-core/lib/network_protocol.hpp b/redfish-core/lib/network_protocol.hpp
index 2621fd6..d06e21a 100644
--- a/redfish-core/lib/network_protocol.hpp
+++ b/redfish-core/lib/network_protocol.hpp
@@ -485,7 +485,6 @@
     App& app, const crow::Request& req,
     const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
-
     if (!redfish::setUpRedfishRoute(app, req, asyncResp))
     {
         return;
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
index 631b5c1..f2acecc 100644
--- a/redfish-core/lib/pcie.hpp
+++ b/redfish-core/lib/pcie.hpp
@@ -31,7 +31,7 @@
 namespace redfish
 {
 
-static constexpr char const* inventoryPath = "/xyz/openbmc_project/inventory";
+static constexpr const char* inventoryPath = "/xyz/openbmc_project/inventory";
 static constexpr std::array<std::string_view, 1> pcieDeviceInterface = {
     "xyz.openbmc_project.Inventory.Item.PCIeDevice"};
 
@@ -430,8 +430,8 @@
     {
         // Check if this function exists by
         // looking for a device ID
-        std::string devIDProperty =
-            "Function" + std::to_string(functionNum) + "DeviceId";
+        std::string devIDProperty = "Function" + std::to_string(functionNum) +
+                                    "DeviceId";
         const std::string* property = nullptr;
         for (const auto& propEntry : pcieDevProperties)
         {
diff --git a/redfish-core/lib/pcie_slots.hpp b/redfish-core/lib/pcie_slots.hpp
index 2b9ef2b..b588ac0 100644
--- a/redfish-core/lib/pcie_slots.hpp
+++ b/redfish-core/lib/pcie_slots.hpp
@@ -124,7 +124,6 @@
 
     if (lanes != nullptr)
     {
-
         slot["Lanes"] = *lanes;
     }
 
diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
index 5d7bbb7..a0eadf5 100644
--- a/redfish-core/lib/power.hpp
+++ b/redfish-core/lib/power.hpp
@@ -121,7 +121,6 @@
 }
 inline void requestRoutesPower(App& app)
 {
-
     BMCWEB_ROUTE(app, "/redfish/v1/Chassis/<str>/Power/")
         .privileges(redfish::privileges::getPower)
         .methods(boost::beast::http::verb::get)(
@@ -178,8 +177,8 @@
                     len = end - (lastPos + 1);
                 }
 
-                std::string interfaceChassisName =
-                    chassis.substr(lastPos + 1, len);
+                std::string interfaceChassisName = chassis.substr(lastPos + 1,
+                                                                  len);
                 if (interfaceChassisName == sensorAsyncResp->chassisId)
                 {
                     found = true;
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index 4566e4b..205578c 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -1058,7 +1058,6 @@
 
 inline void requestRoutesOperatingConfigCollection(App& app)
 {
-
     BMCWEB_ROUTE(
         app, "/redfish/v1/Systems/system/Processors/<str>/OperatingConfigs/")
         .privileges(redfish::privileges::getOperatingConfigCollection)
diff --git a/redfish-core/lib/redfish_sessions.hpp b/redfish-core/lib/redfish_sessions.hpp
index 35d5d5c..e55314a 100644
--- a/redfish-core/lib/redfish_sessions.hpp
+++ b/redfish-core/lib/redfish_sessions.hpp
@@ -48,7 +48,6 @@
                       const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                       const std::string& /*sessionId*/)
 {
-
     if (!redfish::setUpRedfishRoute(app, req, asyncResp))
     {
         return;
@@ -138,7 +137,6 @@
     crow::App& app, const crow::Request& req,
     const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
-
     if (!redfish::setUpRedfishRoute(app, req, asyncResp))
     {
         return;
@@ -246,7 +244,6 @@
     crow::App& app, const crow::Request& req,
     const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
-
     if (!redfish::setUpRedfishRoute(app, req, asyncResp))
     {
         return;
diff --git a/redfish-core/lib/redfish_util.hpp b/redfish-core/lib/redfish_util.hpp
index a742ca6..2e4c6e5 100644
--- a/redfish-core/lib/redfish_util.hpp
+++ b/redfish-core/lib/redfish_util.hpp
@@ -160,8 +160,8 @@
                 const std::string& unitState =
                     std::get<NET_PROTO_UNIT_SUB_STATE>(unit);
 
-                bool isProtocolEnabled =
-                    ((unitState == "running") || (unitState == "listening"));
+                bool isProtocolEnabled = ((unitState == "running") ||
+                                          (unitState == "listening"));
 
                 socketData.emplace_back(socketPath, std::string(kv.first),
                                         isProtocolEnabled);
diff --git a/redfish-core/lib/redfish_v1.hpp b/redfish-core/lib/redfish_v1.hpp
index 8ea46d8..a9b81e4 100644
--- a/redfish-core/lib/redfish_v1.hpp
+++ b/redfish-core/lib/redfish_v1.hpp
@@ -110,8 +110,8 @@
     }
 
     nlohmann::json& json = asyncResp->res.jsonValue;
-    json["@odata.id"] =
-        crow::utility::urlFromPieces("redfish", "v1", "JsonSchemas", schema);
+    json["@odata.id"] = crow::utility::urlFromPieces("redfish", "v1",
+                                                     "JsonSchemas", schema);
     json["@odata.type"] = "#JsonSchemaFile.v1_0_2.JsonSchemaFile";
     json["Name"] = schema + " Schema File";
     json["Description"] = schema + " Schema File Location";
@@ -128,8 +128,8 @@
     nlohmann::json::array_t locationArray;
     nlohmann::json::object_t locationEntry;
     locationEntry["Language"] = "en";
-    locationEntry["PublicationUri"] =
-        "http://redfish.dmtf.org/schemas/v1/" + schema + ".json";
+    locationEntry["PublicationUri"] = "http://redfish.dmtf.org/schemas/v1/" +
+                                      schema + ".json";
     locationEntry["Uri"] = crow::utility::urlFromPieces(
         "redfish", "v1", "JsonSchemas", schema, std::string(schema) + ".json");
 
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index 0772da5..e04eac6 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -756,8 +756,8 @@
     }
 
     sensorJson["Status"]["State"] = getState(inventoryItem);
-    sensorJson["Status"]["Health"] =
-        getHealth(sensorJson, propertiesDict, inventoryItem);
+    sensorJson["Status"]["Health"] = getHealth(sensorJson, propertiesDict,
+                                               inventoryItem);
 
     // Parameter to set to override the type we get from dbus, and force it to
     // int, regardless of what is available.  This is used for schemas like fan,
@@ -959,7 +959,6 @@
     const dbus::utility::DBusInteracesMap& interfacesDict,
     nlohmann::json& sensorJson, InventoryItem* inventoryItem)
 {
-
     for (const auto& [interface, valuesDict] : interfacesDict)
     {
         objectPropertiesToJson(sensorName, sensorType, chassisSubNode,
@@ -1113,10 +1112,10 @@
                         }
                     }
 
-                    size_t minNumNeeded =
-                        collection->empty()
-                            ? 0
-                            : collection->size() - *allowedFailures;
+                    size_t minNumNeeded = collection->empty()
+                                              ? 0
+                                              : collection->size() -
+                                                    *allowedFailures;
                     nlohmann::json& jResp = sensorsAsyncResp->asyncResp->res
                                                 .jsonValue["Redundancy"];
 
@@ -1262,8 +1261,8 @@
     const std::string& invItemObjPath, const std::string& sensorObjPath)
 {
     // Look for inventory item in vector
-    InventoryItem* inventoryItem =
-        findInventoryItem(inventoryItems, invItemObjPath);
+    InventoryItem* inventoryItem = findInventoryItem(inventoryItems,
+                                                     invItemObjPath);
 
     // If inventory item doesn't exist in vector, add it
     if (inventoryItem == nullptr)
@@ -1456,8 +1455,8 @@
                     static_cast<const std::string&>(objDictEntry.first);
 
                 // If this object path is one of the specified inventory items
-                InventoryItem* inventoryItem =
-                    findInventoryItem(inventoryItems, objPath);
+                InventoryItem* inventoryItem = findInventoryItem(inventoryItems,
+                                                                 objPath);
                 if (inventoryItem != nullptr)
                 {
                     // Store inventory data in InventoryItem
diff --git a/redfish-core/lib/storage.hpp b/redfish-core/lib/storage.hpp
index 0388ccd..7182317 100644
--- a/redfish-core/lib/storage.hpp
+++ b/redfish-core/lib/storage.hpp
@@ -737,7 +737,7 @@
                 asyncResp->res.jsonValue["Members@odata.count"] = resp.size();
                 }); // end association lambda
 
-        } // end Iterate over all retrieved ObjectPaths
+        }           // end Iterate over all retrieved ObjectPaths
         });
 }
 
@@ -755,7 +755,6 @@
                        const boost::system::error_code& ec,
                        const dbus::utility::MapperGetSubTreeResponse& subtree)
 {
-
     if (ec)
     {
         BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
@@ -803,7 +802,6 @@
                       const std::string& driveName,
                       const std::vector<std::string>& resp)
 {
-
     for (const std::string& drivePath : resp)
     {
         sdbusplus::message::object_path path(drivePath);
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index c9d31d1..19e5e64 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -139,7 +139,6 @@
     const std::vector<std::pair<std::string, dbus::utility::DbusVariantType>>&
         properties)
 {
-
     BMCWEB_LOG_DEBUG << "Got " << properties.size() << " Cpu properties.";
 
     // TODO: Get Model
@@ -185,7 +184,6 @@
                                 const std::string& service,
                                 const std::string& path)
 {
-
     auto getCpuPresenceState = [aResp](const boost::system::error_code& ec3,
                                        const bool cpuPresenceCheck) {
         if (ec3)
@@ -2792,11 +2790,11 @@
  */
 inline void doNMI(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
-    constexpr char const* serviceName = "xyz.openbmc_project.Control.Host.NMI";
-    constexpr char const* objectPath = "/xyz/openbmc_project/control/host0/nmi";
-    constexpr char const* interfaceName =
+    constexpr const char* serviceName = "xyz.openbmc_project.Control.Host.NMI";
+    constexpr const char* objectPath = "/xyz/openbmc_project/control/host0/nmi";
+    constexpr const char* interfaceName =
         "xyz.openbmc_project.Control.Host.NMI";
-    constexpr char const* method = "NMI";
+    constexpr const char* method = "NMI";
 
     crow::connections::systemBus->async_method_call(
         [asyncResp](const boost::system::error_code& ec) {
@@ -2995,7 +2993,6 @@
  */
 inline void requestRoutesSystems(App& app)
 {
-
     BMCWEB_ROUTE(app, "/redfish/v1/Systems/system/")
         .privileges(redfish::privileges::headComputerSystem)
         .methods(boost::beast::http::verb::head)(
diff --git a/redfish-core/lib/task.hpp b/redfish-core/lib/task.hpp
index 4edfe18..167a0c7 100644
--- a/redfish-core/lib/task.hpp
+++ b/redfish-core/lib/task.hpp
@@ -198,8 +198,8 @@
 
     static void sendTaskEvent(std::string_view state, size_t index)
     {
-        std::string origin =
-            "/redfish/v1/TaskService/Tasks/" + std::to_string(index);
+        std::string origin = "/redfish/v1/TaskService/Tasks/" +
+                             std::to_string(index);
         std::string resType = "Task";
         // TaskState enums which should send out an event are:
         // "Starting" = taskResumed
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 650ba95..59b2b3b 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -212,7 +212,6 @@
                             iface ==
                             "xyz.openbmc_project.Software.ActivationProgress")
                         {
-
                             const uint8_t* progress = nullptr;
                             for (const auto& property : values)
                             {
@@ -538,8 +537,8 @@
     std::ofstream out(filepath, std::ofstream::out | std::ofstream::binary |
                                     std::ofstream::trunc);
     // set the permission of the file to 640
-    std::filesystem::perms permission =
-        std::filesystem::perms::owner_read | std::filesystem::perms::group_read;
+    std::filesystem::perms permission = std::filesystem::perms::owner_read |
+                                        std::filesystem::perms::group_read;
     std::filesystem::permissions(filepath, permission);
     out << body;
 
@@ -616,7 +615,7 @@
             continue;
         }
 
-        for (auto const& param :
+        for (const auto& param :
              boost::beast::http::param_list{it->value().substr(index)})
         {
             if (param.first != "name" || param.second.empty())
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
index 96fd037..373881e 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
@@ -794,7 +794,6 @@
                           const std::string& service, const std::string& name,
                           bool legacy)
 {
-
     // Legacy mount requires parameter with image
     if (legacy)
     {
@@ -952,7 +951,6 @@
 
             for (const auto& object : subtree)
             {
-
                 VmMode mode = parseObjectPathAndGetMode(object.first, resName);
                 if (mode != VmMode::Invalid)
                 {
diff --git a/src/boost_asio.cpp b/src/boost_asio.cpp
index eb3b726..bf00c8f 100644
--- a/src/boost_asio.cpp
+++ b/src/boost_asio.cpp
@@ -1 +1 @@
-#include <boost/asio/impl/src.hpp>
\ No newline at end of file
+#include <boost/asio/impl/src.hpp>
diff --git a/src/boost_asio_ssl.cpp b/src/boost_asio_ssl.cpp
index cb6377d..d98d7b5 100644
--- a/src/boost_asio_ssl.cpp
+++ b/src/boost_asio_ssl.cpp
@@ -1 +1 @@
-#include <boost/asio/ssl/impl/src.hpp>
\ No newline at end of file
+#include <boost/asio/ssl/impl/src.hpp>
diff --git a/src/boost_beast.cpp b/src/boost_beast.cpp
index 1497610..01b7c8f 100644
--- a/src/boost_beast.cpp
+++ b/src/boost_beast.cpp
@@ -1 +1 @@
-#include <boost/beast/src.hpp>
\ No newline at end of file
+#include <boost/beast/src.hpp>
diff --git a/src/boost_url.cpp b/src/boost_url.cpp
index ce55e9b..95ec218 100644
--- a/src/boost_url.cpp
+++ b/src/boost_url.cpp
@@ -1,2 +1,2 @@
 
-#include <boost/url/src.hpp>
\ No newline at end of file
+#include <boost/url/src.hpp>
diff --git a/src/ssl_key_handler_test.cpp b/src/ssl_key_handler_test.cpp
index 818137c..a2b0f55 100644
--- a/src/ssl_key_handler_test.cpp
+++ b/src/ssl_key_handler_test.cpp
@@ -1 +1 @@
-// TODO(ed) WRITE TESTS FOR THIS
\ No newline at end of file
+// TODO(ed) WRITE TESTS FOR THIS
diff --git a/test/http/verb_test.cpp b/test/http/verb_test.cpp
index 76dd8d0..aff6ec7 100644
--- a/test/http/verb_test.cpp
+++ b/test/http/verb_test.cpp
@@ -53,4 +53,4 @@
         HttpVerb httpVerb = static_cast<HttpVerb>(verbIndex);
         EXPECT_EQ(httpVerbToString(httpVerb), verbMap[httpVerb]);
     }
-}
\ No newline at end of file
+}
diff --git a/test/include/dbus_utility_test.cpp b/test/include/dbus_utility_test.cpp
index 71978d0..c6b02c6 100644
--- a/test/include/dbus_utility_test.cpp
+++ b/test/include/dbus_utility_test.cpp
@@ -45,4 +45,4 @@
     EXPECT_FALSE(getNthStringFromPath(path, -1, result));
 }
 } // namespace
-} // namespace dbus::utility
\ No newline at end of file
+} // namespace dbus::utility
diff --git a/test/include/google/google_service_root_test.cpp b/test/include/google/google_service_root_test.cpp
index 32d4e52..b4a476b 100644
--- a/test/include/google/google_service_root_test.cpp
+++ b/test/include/google/google_service_root_test.cpp
@@ -36,4 +36,4 @@
 }
 
 } // namespace
-} // namespace crow::google_api
\ No newline at end of file
+} // namespace crow::google_api
diff --git a/test/include/human_sort_test.cpp b/test/include/human_sort_test.cpp
index be21a19..78d2d22 100644
--- a/test/include/human_sort_test.cpp
+++ b/test/include/human_sort_test.cpp
@@ -55,4 +55,4 @@
                                                             "Alpha 2"};
     EXPECT_THAT(sorted, ElementsAreArray({"Alpha 2", "Alpha 10"}));
 }
-} // namespace
\ No newline at end of file
+} // namespace
diff --git a/test/redfish-core/include/privileges_test.cpp b/test/redfish-core/include/privileges_test.cpp
index 2d0da02..b7f7cbc 100644
--- a/test/redfish-core/include/privileges_test.cpp
+++ b/test/redfish-core/include/privileges_test.cpp
@@ -60,8 +60,8 @@
 
 TEST(PrivilegeTest, PrivilegeCheckForANDCaseSuccess)
 {
-    auto userPrivileges =
-        Privileges{"Login", "ConfigureManager", "ConfigureSelf"};
+    auto userPrivileges = Privileges{"Login", "ConfigureManager",
+                                     "ConfigureSelf"};
     OperationMap entityPrivileges{
         {boost::beast::http::verb::get,
          {{"Login", "ConfigureManager", "ConfigureSelf"}}}};
@@ -135,4 +135,4 @@
                              expectedPrivileges[4]));
 }
 } // namespace
-} // namespace redfish
\ No newline at end of file
+} // namespace redfish
diff --git a/test/redfish-core/include/redfish_aggregator_test.cpp b/test/redfish-core/include/redfish_aggregator_test.cpp
index 2d19cee..055d137 100644
--- a/test/redfish-core/include/redfish_aggregator_test.cpp
+++ b/test/redfish-core/include/redfish_aggregator_test.cpp
@@ -248,8 +248,8 @@
     jsonResp["Name"] = "Test";
 
     crow::Response resp;
-    resp.body() =
-        jsonResp.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+    resp.body() = jsonResp.dump(2, ' ', true,
+                                nlohmann::json::error_handler_t::replace);
     resp.addHeader("Content-Type", "application/json");
     resp.addHeader("Allow", "GET");
     resp.addHeader("Location", "/redfish/v1/Chassis/TestChassis");
@@ -658,8 +658,8 @@
     jsonValue["Test"]["@odata.id"] = "/redfish/v1/Test";
     jsonValue["TelemetryService"]["@odata.id"] = "/redfish/v1/TelemetryService";
     jsonValue["UpdateService"]["@odata.id"] = "/redfish/v1/UpdateService";
-    resp.body() =
-        jsonValue.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+    resp.body() = jsonValue.dump(2, ' ', true,
+                                 nlohmann::json::error_handler_t::replace);
 
     auto asyncResp = std::make_shared<bmcweb::AsyncResp>();
     asyncResp->res.result(200);
@@ -701,8 +701,8 @@
     jsonValue["Test"]["@odata.id"] = "/redfish/v1/Test";
     jsonValue["TelemetryService"]["@odata.id"] = "/redfish/v1/TelemetryService";
     jsonValue["UpdateService"]["@odata.id"] = "/redfish/v1/UpdateService";
-    resp.body() =
-        jsonValue.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+    resp.body() = jsonValue.dump(2, ' ', true,
+                                 nlohmann::json::error_handler_t::replace);
 
     RedfishAggregator::processContainsSubordinateResponse("prefix", asyncResp,
                                                           resp);
@@ -769,8 +769,8 @@
     nlohmann::json jsonValue;
     resp.addHeader("Content-Type", "application/json");
     jsonValue["@odata.id"] = "/redfish/v1";
-    resp.body() =
-        jsonValue.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+    resp.body() = jsonValue.dump(2, ' ', true,
+                                 nlohmann::json::error_handler_t::replace);
 
     RedfishAggregator::processContainsSubordinateResponse("prefix", asyncResp,
                                                           resp);
@@ -788,8 +788,8 @@
     jsonValue["Test"]["@odata.id"] = "/redfish/v1/Test";
     jsonValue["TelemetryService"]["@odata.id"] = "/redfish/v1/TelemetryService";
     jsonValue["UpdateService"]["@odata.id"] = "/redfish/v1/UpdateService";
-    resp.body() =
-        jsonValue.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+    resp.body() = jsonValue.dump(2, ' ', true,
+                                 nlohmann::json::error_handler_t::replace);
 
     RedfishAggregator::processContainsSubordinateResponse("prefix", asyncResp,
                                                           resp);
diff --git a/test/redfish-core/include/utils/hex_utils_test.cpp b/test/redfish-core/include/utils/hex_utils_test.cpp
index 8fd4638..d96e4d4 100644
--- a/test/redfish-core/include/utils/hex_utils_test.cpp
+++ b/test/redfish-core/include/utils/hex_utils_test.cpp
@@ -80,4 +80,4 @@
     EXPECT_THAT(hexStringToBytes("012"), IsEmpty());
 }
 
-} // namespace
\ No newline at end of file
+} // namespace
diff --git a/test/redfish-core/include/utils/query_param_test.cpp b/test/redfish-core/include/utils/query_param_test.cpp
index d049314..8c75241 100644
--- a/test/redfish-core/include/utils/query_param_test.cpp
+++ b/test/redfish-core/include/utils/query_param_test.cpp
@@ -232,7 +232,7 @@
 SelectTrie getTrie(std::span<std::string_view> properties)
 {
     SelectTrie trie;
-    for (auto const& property : properties)
+    for (const auto& property : properties)
     {
         EXPECT_TRUE(trie.insertNode(property));
     }
diff --git a/test/redfish-core/lib/chassis_test.cpp b/test/redfish-core/lib/chassis_test.cpp
index a043859..8f18163 100644
--- a/test/redfish-core/lib/chassis_test.cpp
+++ b/test/redfish-core/lib/chassis_test.cpp
@@ -42,7 +42,6 @@
 
 TEST(HandleChassisResetActionInfoGet, StaticAttributesAreExpected)
 {
-
     auto response = std::make_shared<bmcweb::AsyncResp>();
     std::error_code err;
     crow::Request request{{boost::beast::http::verb::get, "/whatever", 11},
@@ -57,4 +56,4 @@
 }
 
 } // namespace
-} // namespace redfish
\ No newline at end of file
+} // namespace redfish
