diff --git a/.clang-format b/.clang-format
index dd27708..ef6f54e 100644
--- a/.clang-format
+++ b/.clang-format
@@ -5,7 +5,7 @@
 AlignAfterOpenBracket: Align
 AlignConsecutiveAssignments: false
 AlignConsecutiveDeclarations: false
-AlignEscapedNewlinesLeft: false
+AlignEscapedNewlines: Right
 AlignOperands:   true
 AlignTrailingComments: true
 AllowAllParametersOfDeclarationOnNextLine: true
@@ -14,13 +14,13 @@
 AllowShortFunctionsOnASingleLine: None
 AllowShortIfStatementsOnASingleLine: false
 AllowShortLoopsOnASingleLine: false
-AlwaysBreakAfterDefinitionReturnType: None
 AlwaysBreakAfterReturnType: None
 AlwaysBreakBeforeMultilineStrings: false
-AlwaysBreakTemplateDeclarations: false
+AlwaysBreakTemplateDeclarations: Yes
 BinPackArguments: true
 BinPackParameters: true
 BraceWrapping:
+  AfterCaseLabel:  true
   AfterClass:      true
   AfterControlStatement: true
   AfterEnum:       true
@@ -29,20 +29,27 @@
   AfterObjCDeclaration: true
   AfterStruct:     true
   AfterUnion:      true
+  AfterExternBlock: true
   BeforeCatch:     true
   BeforeElse:      true
   IndentBraces:    false
+  SplitEmptyFunction:   false
+  SplitEmptyRecord:     false
+  SplitEmptyNamespace:  false
 BreakBeforeBinaryOperators: None
 BreakBeforeBraces: Custom
 BreakBeforeTernaryOperators: true
 BreakConstructorInitializers: AfterColon
+BreakInheritanceList: AfterColon
+BreakStringLiterals: true
 ColumnLimit:     80
 CommentPragmas:  '^ IWYU pragma:'
+CompactNamespaces: false
 ConstructorInitializerAllOnOneLineOrOnePerLine: false
 ConstructorInitializerIndentWidth: 4
 ContinuationIndentWidth: 4
 Cpp11BracedListStyle: true
-DerivePointerAlignment: true
+DerivePointerAlignment: false
 PointerAlignment: Left
 DisableFormat:   false
 ExperimentalAutoDetectBinPacking: false
@@ -51,17 +58,21 @@
 IncludeBlocks: Regroup
 IncludeCategories:
   - Regex:           '^[<"](gtest|gmock)'
-    Priority:        5
+    Priority:        7
   - Regex:           '^"config.h"'
     Priority:        -1
-  - Regex:           '^".*\.hpp"'
+  - Regex:           '^".*\.h"'
     Priority:        1
-  - Regex:           '^<.*\.h>'
+  - Regex:           '^".*\.hpp"'
     Priority:        2
-  - Regex:           '^<.*'
+  - Regex:           '^<.*\.h>'
     Priority:        3
-  - Regex:           '.*'
+  - Regex:           '^<.*\.hpp>'
     Priority:        4
+  - Regex:           '^<.*'
+    Priority:        5
+  - Regex:           '.*'
+    Priority:        6
 IndentCaseLabels: true
 IndentWidth:     4
 IndentWrappedFunctionNames: true
@@ -79,12 +90,17 @@
 PenaltyBreakString: 1000
 PenaltyExcessCharacter: 1000000
 PenaltyReturnTypeOnItsOwnLine: 60
-PointerAlignment: Right
 ReflowComments:  true
 SortIncludes:    true
+SortUsingDeclarations: true
 SpaceAfterCStyleCast: false
+SpaceAfterTemplateKeyword: true
 SpaceBeforeAssignmentOperators: true
+SpaceBeforeCpp11BracedList: false
+SpaceBeforeCtorInitializerColon: true
+SpaceBeforeInheritanceColon: true
 SpaceBeforeParens: ControlStatements
+SpaceBeforeRangeBasedForLoopColon: true
 SpaceInEmptyParentheses: false
 SpacesBeforeTrailingComments: 1
 SpacesInAngles:  false
@@ -96,3 +112,4 @@
 TabWidth:        4
 UseTab:          Never
 ...
+
diff --git a/include/pulse_event_monitor.hpp b/include/pulse_event_monitor.hpp
index 15d2531..bdd1ee4 100644
--- a/include/pulse_event_monitor.hpp
+++ b/include/pulse_event_monitor.hpp
@@ -22,7 +22,7 @@
 inline static sdbusplus::bus::match::match
     startPulseEventMonitor(std::shared_ptr<sdbusplus::asio::connection> conn)
 {
-    auto pulseEventMatcherCallback = [](sdbusplus::message::message &msg) {
+    auto pulseEventMatcherCallback = [](sdbusplus::message::message& msg) {
         std::string thresholdInterface;
         boost::container::flat_map<std::string, std::variant<std::string>>
             propertiesChanged;
@@ -68,7 +68,7 @@
     };
 
     sdbusplus::bus::match::match pulseEventMatcher(
-        static_cast<sdbusplus::bus::bus &>(*conn),
+        static_cast<sdbusplus::bus::bus&>(*conn),
         "type='signal',interface='org.freedesktop.DBus.Properties',member='"
         "PropertiesChanged',arg0namespace='xyz.openbmc_project.State.Host'",
         std::move(pulseEventMatcherCallback));
diff --git a/include/sel_logger.hpp b/include/sel_logger.hpp
index bd40dff..58c7cc6 100644
--- a/include/sel_logger.hpp
+++ b/include/sel_logger.hpp
@@ -17,14 +17,14 @@
 #pragma once
 #include <filesystem>
 
-static constexpr char const *ipmiSelObject = "xyz.openbmc_project.Logging.IPMI";
-static constexpr char const *ipmiSelPath = "/xyz/openbmc_project/Logging/IPMI";
-static constexpr char const *ipmiSelAddInterface =
+static constexpr char const* ipmiSelObject = "xyz.openbmc_project.Logging.IPMI";
+static constexpr char const* ipmiSelPath = "/xyz/openbmc_project/Logging/IPMI";
+static constexpr char const* ipmiSelAddInterface =
     "xyz.openbmc_project.Logging.IPMI";
 
 // ID string generated using journalctl to include in the MESSAGE_ID field for
 // SEL entries.  Helps with filtering SEL entries in the journal.
-static constexpr char const *selMessageId = "b370836ccf2f4850ac5bee185b77893a";
+static constexpr char const* selMessageId = "b370836ccf2f4850ac5bee185b77893a";
 static constexpr int selPriority = 5; // notice
 static constexpr uint8_t selSystemType = 0x02;
 static constexpr uint16_t selBMCGenID = 0x0020;
@@ -38,6 +38,6 @@
 
 template <typename... T>
 static uint16_t
-    selAddSystemRecord(const std::string &message, const std::string &path,
-                       const std::vector<uint8_t> &selData, const bool &assert,
-                       const uint16_t &genId, T &&... metadata);
+    selAddSystemRecord(const std::string& message, const std::string& path,
+                       const std::vector<uint8_t>& selData, const bool& assert,
+                       const uint16_t& genId, T&&... metadata);
diff --git a/include/sensorutils.hpp b/include/sensorutils.hpp
index ce5d775..16eb8ce 100644
--- a/include/sensorutils.hpp
+++ b/include/sensorutils.hpp
@@ -15,9 +15,10 @@
 */
 
 #pragma once
+#include <phosphor-logging/log.hpp>
+
 #include <cmath>
 #include <iostream>
-#include <phosphor-logging/log.hpp>
 
 namespace ipmi
 {
@@ -27,7 +28,8 @@
  */
 struct VariantToDoubleVisitor
 {
-    template <typename T> double operator()(const T& t) const
+    template <typename T>
+    double operator()(const T& t) const
     {
         static_assert(std::is_arithmetic_v<T>,
                       "Cannot translate type to double");
diff --git a/include/threshold_event_monitor.hpp b/include/threshold_event_monitor.hpp
index b1f2eed..da63e0d 100644
--- a/include/threshold_event_monitor.hpp
+++ b/include/threshold_event_monitor.hpp
@@ -17,6 +17,7 @@
 #pragma once
 #include <sel_logger.hpp>
 #include <sensorutils.hpp>
+
 #include <string_view>
 #include <variant>
 
@@ -37,7 +38,7 @@
     std::shared_ptr<sdbusplus::asio::connection> conn)
 {
     auto thresholdEventMatcherCallback = [conn](
-                                             sdbusplus::message::message &msg) {
+                                             sdbusplus::message::message& msg) {
         // This static set of std::pair<path, event> tracks asserted events to
         // avoid duplicate logs or deasserts logged without an assert
         static boost::container::flat_set<std::pair<std::string, std::string>>
@@ -51,7 +52,7 @@
             propertiesChanged;
         msg.read(thresholdInterface, propertiesChanged);
         std::string event = propertiesChanged.begin()->first;
-        bool *pval = std::get_if<bool>(&propertiesChanged.begin()->second);
+        bool* pval = std::get_if<bool>(&propertiesChanged.begin()->second);
         if (!pval)
         {
             std::cerr << "threshold event direction has invalid type\n";
@@ -121,7 +122,7 @@
                 conn->call(getSensorValue);
             getSensorValueResp.read(sensorValue);
         }
-        catch (sdbusplus::exception_t &)
+        catch (sdbusplus::exception_t&)
         {
             std::cerr << "error getting sensor value from " << msg.get_path()
                       << "\n";
@@ -159,7 +160,7 @@
         {
             eventData[1] = ipmi::getScaledIPMIValue(sensorVal, max, min);
         }
-        catch (const std::exception &e)
+        catch (const std::exception& e)
         {
             std::cerr << e.what();
             eventData[1] = 0xFF;
@@ -185,7 +186,7 @@
                 conn->call(getThreshold);
             getThresholdResp.read(thresholdValue);
         }
-        catch (sdbusplus::exception_t &)
+        catch (sdbusplus::exception_t&)
         {
             std::cerr << "error getting sensor threshold from "
                       << msg.get_path() << "\n";
@@ -201,7 +202,7 @@
         {
             eventData[2] = ipmi::getScaledIPMIValue(thresholdVal, max, min);
         }
-        catch (const std::exception &e)
+        catch (const std::exception& e)
         {
             std::cerr << e.what();
             eventData[2] = 0xFF;
@@ -286,7 +287,7 @@
             sensorName.data(), sensorVal, thresholdVal);
     };
     sdbusplus::bus::match::match thresholdEventMatcher(
-        static_cast<sdbusplus::bus::bus &>(*conn),
+        static_cast<sdbusplus::bus::bus&>(*conn),
         "type='signal',interface='org.freedesktop.DBus.Properties',member='"
         "PropertiesChanged',arg0namespace='xyz.openbmc_project.Sensor."
         "Threshold'",
diff --git a/src/sel_logger.cpp b/src/sel_logger.cpp
index 7fe52fb..fadcc17 100644
--- a/src/sel_logger.cpp
+++ b/src/sel_logger.cpp
@@ -18,37 +18,38 @@
 #include <boost/algorithm/string.hpp>
 #include <boost/container/flat_map.hpp>
 #include <boost/container/flat_set.hpp>
+#include <pulse_event_monitor.hpp>
+#include <sdbusplus/asio/object_server.hpp>
+#include <sel_logger.hpp>
+#include <threshold_event_monitor.hpp>
+
 #include <filesystem>
 #include <fstream>
 #include <iomanip>
 #include <iostream>
-#include <pulse_event_monitor.hpp>
-#include <sdbusplus/asio/object_server.hpp>
-#include <sel_logger.hpp>
 #include <sstream>
-#include <threshold_event_monitor.hpp>
 
 struct DBusInternalError final : public sdbusplus::exception_t
 {
-    const char *name() const noexcept override
+    const char* name() const noexcept override
     {
         return "org.freedesktop.DBus.Error.Failed";
     };
-    const char *description() const noexcept override
+    const char* description() const noexcept override
     {
         return "internal error";
     };
-    const char *what() const noexcept override
+    const char* what() const noexcept override
     {
         return "org.freedesktop.DBus.Error.Failed: "
                "internal error";
     };
 };
 
-static bool getSELLogFiles(std::vector<std::filesystem::path> &selLogFiles)
+static bool getSELLogFiles(std::vector<std::filesystem::path>& selLogFiles)
 {
     // Loop through the directory looking for ipmi_sel log files
-    for (const std::filesystem::directory_entry &dirEnt :
+    for (const std::filesystem::directory_entry& dirEnt :
          std::filesystem::directory_iterator(selLogDir))
     {
         std::string filename = dirEnt.path().filename();
@@ -114,11 +115,11 @@
     return recordId;
 }
 
-static void toHexStr(const std::vector<uint8_t> &data, std::string &hexStr)
+static void toHexStr(const std::vector<uint8_t>& data, std::string& hexStr)
 {
     std::stringstream stream;
     stream << std::hex << std::uppercase << std::setfill('0');
-    for (const int &v : data)
+    for (const int& v : data)
     {
         stream << std::setw(2) << v;
     }
@@ -127,9 +128,9 @@
 
 template <typename... T>
 static uint16_t
-    selAddSystemRecord(const std::string &message, const std::string &path,
-                       const std::vector<uint8_t> &selData, const bool &assert,
-                       const uint16_t &genId, T &&... metadata)
+    selAddSystemRecord(const std::string& message, const std::string& path,
+                       const std::vector<uint8_t>& selData, const bool& assert,
+                       const uint16_t& genId, T&&... metadata)
 {
     // Only 3 bytes of SEL event data are allowed in a system record
     if (selData.size() > selEvtDataMaxSize)
@@ -150,9 +151,9 @@
     return recordId;
 }
 
-static uint16_t selAddOemRecord(const std::string &message,
-                                const std::vector<uint8_t> &selData,
-                                const uint8_t &recordType)
+static uint16_t selAddOemRecord(const std::string& message,
+                                const std::vector<uint8_t>& selData,
+                                const uint8_t& recordType)
 {
     // A maximum of 13 bytes of SEL event data are allowed in an OEM record
     if (selData.size() > selOemDataMaxSize)
@@ -170,7 +171,7 @@
     return recordId;
 }
 
-int main(int argc, char *argv[])
+int main(int argc, char* argv[])
 {
     // setup connection to dbus
     boost::asio::io_service io;
@@ -186,16 +187,16 @@
 
     // Add a new SEL entry
     ifaceAddSel->register_method(
-        "IpmiSelAdd", [](const std::string &message, const std::string &path,
-                         const std::vector<uint8_t> &selData,
-                         const bool &assert, const uint16_t &genId) {
+        "IpmiSelAdd", [](const std::string& message, const std::string& path,
+                         const std::vector<uint8_t>& selData,
+                         const bool& assert, const uint16_t& genId) {
             return selAddSystemRecord(message, path, selData, assert, genId);
         });
     // Add a new OEM SEL entry
     ifaceAddSel->register_method(
         "IpmiSelAddOem",
-        [](const std::string &message, const std::vector<uint8_t> &selData,
-           const uint8_t &recordType) {
+        [](const std::string& message, const std::vector<uint8_t>& selData,
+           const uint8_t& recordType) {
             return selAddOemRecord(message, selData, recordType);
         });
     ifaceAddSel->initialize();
