diff --git a/.clang-format b/.clang-format
index d43e884..28e3328 100644
--- a/.clang-format
+++ b/.clang-format
@@ -87,7 +87,7 @@
 IndentWrappedFunctionNames: true
 InsertNewlineAtEOF: true
 KeepEmptyLinesAtTheStartOfBlocks: false
-LambdaBodyIndentation: OuterScope
+LambdaBodyIndentation: Signature
 LineEnding: LF
 MacroBlockBegin: ''
 MacroBlockEnd:   ''
@@ -98,13 +98,14 @@
 ObjCSpaceBeforeProtocolList: true
 PackConstructorInitializers: BinPack
 PenaltyBreakAssignment: 25
-PenaltyBreakBeforeFirstCallParameter: 19
+PenaltyBreakBeforeFirstCallParameter: 50
 PenaltyBreakComment: 300
 PenaltyBreakFirstLessLess: 120
 PenaltyBreakString: 1000
+PenaltyBreakTemplateDeclaration: 10
 PenaltyExcessCharacter: 1000000
 PenaltyReturnTypeOnItsOwnLine: 60
-PenaltyIndentedWhitespace: 0
+PenaltyIndentedWhitespace: 1
 PointerAlignment: Left
 QualifierAlignment: Left
 ReferenceAlignment: Left
diff --git a/mslverify/util.hpp b/mslverify/util.hpp
index 4c1ea00..1c1ee41 100644
--- a/mslverify/util.hpp
+++ b/mslverify/util.hpp
@@ -79,10 +79,9 @@
 
 /** @brief Invoke a method and read the response. */
 template <typename Ret, typename... Args>
-static auto callMethodAndRead(const std::string& busName,
-                              const std::string& path,
-                              const std::string& interface,
-                              const std::string& method, Args&&... args)
+static auto callMethodAndRead(
+    const std::string& busName, const std::string& path,
+    const std::string& interface, const std::string& method, Args&&... args)
 {
     return callMethodAndRead<Ret>(getBus(), busName, path, interface, method,
                                   std::forward<Args>(args)...);
@@ -118,9 +117,9 @@
 {
     using namespace std::literals::string_literals;
 
-    auto msg = callMethod(bus, busName, path,
-                          "org.freedesktop.DBus.Properties"s, "Get"s, interface,
-                          property);
+    auto msg =
+        callMethod(bus, busName, path, "org.freedesktop.DBus.Properties"s,
+                   "Get"s, interface, property);
     ::std::variant<Property> value;
     msg.read(value);
     return std::get<Property>(value);
diff --git a/src/callback.hpp b/src/callback.hpp
index 0295246..7d23077 100644
--- a/src/callback.hpp
+++ b/src/callback.hpp
@@ -48,7 +48,7 @@
      *  @param[in] msg - The sdbusplus signal message
      */
     virtual void operator()(Context /* ctx */,
-                            sdbusplus::message_t& /* msg */){};
+                            sdbusplus::message_t& /* msg */) {};
 };
 
 /** @class Conditional
@@ -171,9 +171,7 @@
     ConditionalCallback& operator=(ConditionalCallback&&) = default;
     virtual ~ConditionalCallback() = default;
     ConditionalCallback(const std::vector<size_t>& graphEntry,
-                        Conditional& cond) :
-        graph(graphEntry),
-        condition(cond)
+                        Conditional& cond) : graph(graphEntry), condition(cond)
     {}
 
     /** @brief Run the callback if the condition is satisfied. */
@@ -235,14 +233,14 @@
     {
         if (!timer)
         {
-            timer =
-                std::make_unique<TimerType>(sdeventplus::Event::get_default(),
-                                            // **INDENT-OFF**
-                                            [this](auto& /* source */) {
-                // The timer uses the context saved on timer enable
-                this->ConditionalCallback<CallbackAccess>::operator()(
-                    this->ctx);
-            });
+            timer = std::make_unique<TimerType>(
+                sdeventplus::Event::get_default(),
+                // **INDENT-OFF**
+                [this](auto& /* source */) {
+                    // The timer uses the context saved on timer enable
+                    this->ConditionalCallback<CallbackAccess>::operator()(
+                        this->ctx);
+                });
             // **INDENT-ON**
         }
 
diff --git a/src/count.hpp b/src/count.hpp
index 3dad8e7..ed0b2c9 100644
--- a/src/count.hpp
+++ b/src/count.hpp
@@ -47,34 +47,35 @@
                    const std::function<bool(size_t)>& _countOp,
                    const std::function<bool(T)>& _propertyOp,
                    bool oneshot = false) :
-        IndexedConditional(conditionIndex),
-        countOp(_countOp), propertyOp(_propertyOp), oneshot(oneshot)
+        IndexedConditional(conditionIndex), countOp(_countOp),
+        propertyOp(_propertyOp), oneshot(oneshot)
     {}
 
     bool operator()() override
     {
         // Count the number of properties in the index that
         // pass the condition specified in the config file.
-        auto count = std::count_if(index.cbegin(), index.cend(),
-                                   [this](const auto& item)
-                                   // *INDENT-OFF*
-        {
-            // Get the property value from storage[0],
-            // and save the op result in storage[1].
-            const auto& storage = std::get<storageIndex>(item.second);
-            // Don't count properties that don't exist.
-            if (!std::get<valueIndex>(storage.get()).has_value())
+        auto count = std::count_if(
+            index.cbegin(), index.cend(),
+            [this](const auto& item)
+            // *INDENT-OFF*
             {
-                return false;
-            }
-            const auto& value =
-                std::any_cast<T>(std::get<valueIndex>(storage.get()));
-            auto r = propertyOp(value);
+                // Get the property value from storage[0],
+                // and save the op result in storage[1].
+                const auto& storage = std::get<storageIndex>(item.second);
+                // Don't count properties that don't exist.
+                if (!std::get<valueIndex>(storage.get()).has_value())
+                {
+                    return false;
+                }
+                const auto& value =
+                    std::any_cast<T>(std::get<valueIndex>(storage.get()));
+                auto r = propertyOp(value);
 
-            std::get<resultIndex>(storage.get()) = r;
+                std::get<resultIndex>(storage.get()) = r;
 
-            return r;
-        });
+                return r;
+            });
         // *INDENT-ON*
 
         // Now apply the count condition to the count.
diff --git a/src/event.hpp b/src/event.hpp
index 9292a99..b355ca5 100644
--- a/src/event.hpp
+++ b/src/event.hpp
@@ -92,8 +92,7 @@
      */
     Event(const std::string& eventName, const std::string& eventMessage,
           const PropertyIndex& index) :
-        EventBase(index),
-        name(eventName), message(eventMessage)
+        EventBase(index), name(eventName), message(eventMessage)
     {}
 
   private:
diff --git a/src/event_manager.cpp b/src/event_manager.cpp
index c0c0c4a..77c6b80 100644
--- a/src/event_manager.cpp
+++ b/src/event_manager.cpp
@@ -77,10 +77,10 @@
         fs::remove(eventPath, ec);
     }
 
-    auto event = std::make_unique<Entry>(objPath,
-                                         ms, // Milliseconds since 1970
-                                         std::move(msg),
-                                         std::move(additionalData));
+    auto event = std::make_unique<Entry>(
+        objPath,
+        ms, // Milliseconds since 1970
+        std::move(msg), std::move(additionalData));
     serialize(*event, eventName);
     eventQueue.push(std::move(event));
 }
diff --git a/src/median.hpp b/src/median.hpp
index 9976972..254d6cf 100644
--- a/src/median.hpp
+++ b/src/median.hpp
@@ -44,8 +44,8 @@
     MedianCondition(const PropertyIndex& conditionIndex,
                     const std::function<bool(T)>& _medianOp,
                     bool oneshot = false) :
-        IndexedConditional(conditionIndex),
-        medianOp(_medianOp), oneshot(oneshot)
+        IndexedConditional(conditionIndex), medianOp(_medianOp),
+        oneshot(oneshot)
     {}
 
     bool operator()() override
diff --git a/src/method.hpp b/src/method.hpp
index 7190a88..baaebcd 100644
--- a/src/method.hpp
+++ b/src/method.hpp
@@ -63,8 +63,7 @@
     virtual ~MethodBase() = default;
     MethodBase(const std::string& b, const std::string& p, const std::string& i,
                const std::string& m) :
-        Callback(),
-        bus(b), path(p), interface(i), method(m)
+        Callback(), bus(b), path(p), interface(i), method(m)
     {}
 
     /** @brief Callback interface implementation. */
diff --git a/src/pathwatchimpl.hpp b/src/pathwatchimpl.hpp
index f2ac946..282ed60 100644
--- a/src/pathwatchimpl.hpp
+++ b/src/pathwatchimpl.hpp
@@ -33,7 +33,7 @@
         sdbusplus::bus::match::rules::interfacesAdded(objectPath),
         [this](auto& msg)
         // *INDENT-OFF*
-    { (this->cb)(Context::SIGNAL, msg); });
+        { (this->cb)(Context::SIGNAL, msg); });
     // *INDENT-ON*
 
     alreadyRan = true;
diff --git a/src/propertywatch.hpp b/src/propertywatch.hpp
index e1ae986..57eda6f 100644
--- a/src/propertywatch.hpp
+++ b/src/propertywatch.hpp
@@ -41,8 +41,7 @@
     PropertyWatch(const PropertyIndex& watchIndex,
                   bool ignoreStartCallback = false,
                   Callback* callback = nullptr) :
-        Watch(),
-        index(watchIndex), cb(callback), alreadyRan(false),
+        Watch(), index(watchIndex), cb(callback), alreadyRan(false),
         ignoreStartCallback(ignoreStartCallback)
     {}
 
diff --git a/src/propertywatchimpl.hpp b/src/propertywatchimpl.hpp
index 9c009fe..cf97f63 100644
--- a/src/propertywatchimpl.hpp
+++ b/src/propertywatchimpl.hpp
@@ -45,7 +45,7 @@
             sdbusplus::bus::match::rules::interfacesAdded(path),
             [this](auto& msg)
             // *INDENT-OFF*
-        { this->interfacesAdded(msg); });
+            { this->interfacesAdded(msg); });
         // *INDENT-ON*
 
         // Do a query to populate the cache.  Start with a mapper query.
@@ -77,12 +77,12 @@
                                                                 interface),
                 [this](auto& msg)
                 // *INDENT-OFF*
-            {
-                std::string interface;
-                msg.read(interface);
-                auto path = msg.get_path();
-                this->propertiesChanged(msg, path, interface);
-            });
+                {
+                    std::string interface;
+                    msg.read(interface);
+                    auto path = msg.get_path();
+                    this->propertiesChanged(msg, path, interface);
+                });
             // *INDENT-ON*
 
             // The mapper response is a busname:[interfaces] map.  Look for
diff --git a/src/sdbusplus.hpp b/src/sdbusplus.hpp
index 670caa0..083cdf4 100644
--- a/src/sdbusplus.hpp
+++ b/src/sdbusplus.hpp
@@ -39,10 +39,9 @@
 
     /** @brief Invoke a method; ignore reply. */
     template <typename... Args>
-    static void callMethodNoReply(const std::string& busName,
-                                  const std::string& path,
-                                  const std::string& interface,
-                                  const std::string& method, Args&&... args)
+    static void callMethodNoReply(
+        const std::string& busName, const std::string& path,
+        const std::string& interface, const std::string& method, Args&&... args)
     {
         auto reqMsg = getBus().new_method_call(
             busName.c_str(), path.c_str(), interface.c_str(), method.c_str());
@@ -68,10 +67,9 @@
 
     /** @brief Invoke a method and read the response. */
     template <typename Ret, typename... Args>
-    static auto callMethodAndRead(const std::string& busName,
-                                  const std::string& path,
-                                  const std::string& interface,
-                                  const std::string& method, Args&&... args)
+    static auto callMethodAndRead(
+        const std::string& busName, const std::string& path,
+        const std::string& interface, const std::string& method, Args&&... args)
     {
         Ret resp;
         sdbusplus::message_t respMsg = callMethod<Args...>(
diff --git a/src/test/propertywatchtest.hpp b/src/test/propertywatchtest.hpp
index f6b7496..e912b43 100644
--- a/src/test/propertywatchtest.hpp
+++ b/src/test/propertywatchtest.hpp
@@ -270,10 +270,9 @@
 
     /** @brief GMock member template/free function forward. */
     template <typename Ret, typename... Args>
-    static auto callMethodAndRead(const std::string& busName,
-                                  const std::string& path,
-                                  const std::string& interface,
-                                  const std::string& method, Args&&... args)
+    static auto callMethodAndRead(
+        const std::string& busName, const std::string& path,
+        const std::string& interface, const std::string& method, Args&&... args)
     {
         return CallMethodAndRead<MockDBusInterface, Ret, Args...>::op(
             instance(), busName, path, interface, method,
diff --git a/src/watch.hpp b/src/watch.hpp
index 5cf2c19..36e7df1 100644
--- a/src/watch.hpp
+++ b/src/watch.hpp
@@ -39,7 +39,8 @@
     virtual void callback(Context ctx) = 0;
 
     /** @brief Invoke the callback associated with the watch. */
-    virtual void callback(Context /* ctx */, sdbusplus::message_t& /* msg */){};
+    virtual void callback(Context /* ctx */, sdbusplus::message_t& /* msg */) {
+    };
 };
 
 } // namespace monitoring
