diff --git a/manager/json-config.hpp b/manager/json-config.hpp
index eadf4b4..64441b3 100644
--- a/manager/json-config.hpp
+++ b/manager/json-config.hpp
@@ -70,17 +70,17 @@
      */
     bool filePathExists(const std::vector<std::string>& names)
     {
-        auto it = std::find_if(names.begin(), names.end(),
-                               [this](const auto& name) {
-            auto configFileName = name + ".json";
-            auto configFilePath = fs::path{confBasePath} / configFileName;
-            if (fs::exists(configFilePath))
-            {
-                confFile = configFilePath;
-                return true;
-            }
-            return false;
-        });
+        auto it =
+            std::find_if(names.begin(), names.end(), [this](const auto& name) {
+                auto configFileName = name + ".json";
+                auto configFilePath = fs::path{confBasePath} / configFileName;
+                if (fs::exists(configFilePath))
+                {
+                    confFile = configFilePath;
+                    return true;
+                }
+                return false;
+            });
         return it == names.end() ? false : true;
     }
 
@@ -160,8 +160,8 @@
         try
         {
             // Get all objects implementing the compatible interface
-            auto objects = dBusHandler.getSubTreePaths("/",
-                                                       confCompatibleInterface);
+            auto objects =
+                dBusHandler.getSubTreePaths("/", confCompatibleInterface);
             for (const auto& path : objects)
             {
                 try
diff --git a/manager/led-main.cpp b/manager/led-main.cpp
index 47d97dc..a18c793 100644
--- a/manager/led-main.cpp
+++ b/manager/led-main.cpp
@@ -80,9 +80,9 @@
     /** Now create so many dbus objects as there are groups */
     std::ranges::transform(systemLedMap, std::back_inserter(groups),
                            [&bus, &manager, serializePtr](auto& grp) {
-        return std::make_unique<phosphor::led::Group>(bus, grp.first, manager,
-                                                      serializePtr);
-    });
+                               return std::make_unique<phosphor::led::Group>(
+                                   bus, grp.first, manager, serializePtr);
+                           });
 
     // Attach the bus to sd_event to service user requests
     bus.attach_event(event.get(), SD_EVENT_PRIORITY_NORMAL);
diff --git a/manager/manager.hpp b/manager/manager.hpp
index caa7ba8..4e611b8 100644
--- a/manager/manager.hpp
+++ b/manager/manager.hpp
@@ -83,8 +83,8 @@
     Manager(
         sdbusplus::bus_t& bus, const GroupMap& ledLayout,
         const sdeventplus::Event& event = sdeventplus::Event::get_default()) :
-        ledMap(ledLayout),
-        bus(bus), timer(event, [this](auto&) { driveLedsHandler(); })
+        ledMap(ledLayout), bus(bus),
+        timer(event, [this](auto&) { driveLedsHandler(); })
     {
         // Nothing here
     }
