clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: Ic0bb299201cf8abb024b7d4aca465d50cbc8b585
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/test/dbus_active_unittest.cpp b/test/dbus_active_unittest.cpp
index c9f663e..562dd73 100644
--- a/test/dbus_active_unittest.cpp
+++ b/test/dbus_active_unittest.cpp
@@ -45,10 +45,10 @@
         .WillOnce(Invoke([&]([[maybe_unused]] const std::string& service,
                              [[maybe_unused]] const std::string& path,
                              SensorProperties* prop) {
-            prop->scale = -3;
-            prop->value = 10000;
-            prop->unit = "x";
-        }));
+        prop->scale = -3;
+        prop->value = 10000;
+        prop->unit = "x";
+    }));
 
     DbusActiveRead ar(bus_mock, path, service, std::move(helper));
 
diff --git a/test/dbus_passive_unittest.cpp b/test/dbus_passive_unittest.cpp
index 9120336..29c73dc 100644
--- a/test/dbus_passive_unittest.cpp
+++ b/test/dbus_passive_unittest.cpp
@@ -79,13 +79,13 @@
             .WillOnce(Invoke([&]([[maybe_unused]] const std::string& service,
                                  [[maybe_unused]] const std::string& path,
                                  SensorProperties* prop) {
-                prop->scale = _scale;
-                prop->value = _value;
-                prop->unit = "x";
-                prop->min = 0;
-                prop->max = 0;
-                prop->available = true;
-            }));
+            prop->scale = _scale;
+            prop->value = _value;
+            prop->unit = "x";
+            prop->min = 0;
+            prop->max = 0;
+            prop->available = true;
+        }));
         EXPECT_CALL(*helper, thresholdsAsserted(StrEq("asdf"), StrEq(path)))
             .WillOnce(Return(false));
 
@@ -168,18 +168,18 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            const char** s = static_cast<const char**>(p);
-            // Read the first parameter, the string.
-            *s = intf;
-            return 0;
-        }))
+        const char** s = static_cast<const char**>(p);
+        // Read the first parameter, the string.
+        *s = intf;
+        return 0;
+    }))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            const char** s = static_cast<const char**>(p);
-            *s = Value;
-            // Read the string in the pair (dictionary).
-            return 0;
-        }));
+        const char** s = static_cast<const char**>(p);
+        *s = Value;
+        // Read the string in the pair (dictionary).
+        return 0;
+    }));
 
     // std::map
     EXPECT_CALL(sdbus_mock,
@@ -206,10 +206,10 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'x', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            int64_t* s = static_cast<int64_t*>(p);
-            *s = xValue;
-            return 0;
-        }));
+        int64_t* s = static_cast<int64_t*>(p);
+        *s = xValue;
+        return 0;
+    }));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_exit_container(IsNull()))
         .WillOnce(Return(0))  /* variant. */
@@ -241,18 +241,18 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            const char** s = static_cast<const char**>(p);
-            // Read the first parameter, the string.
-            *s = intf;
-            return 0;
-        }))
+        const char** s = static_cast<const char**>(p);
+        // Read the first parameter, the string.
+        *s = intf;
+        return 0;
+    }))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            const char** s = static_cast<const char**>(p);
-            *s = Scale;
-            // Read the string in the pair (dictionary).
-            return 0;
-        }));
+        const char** s = static_cast<const char**>(p);
+        *s = Scale;
+        // Read the string in the pair (dictionary).
+        return 0;
+    }));
 
     // std::map
     EXPECT_CALL(sdbus_mock,
@@ -279,10 +279,10 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'x', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            int64_t* s = static_cast<int64_t*>(p);
-            *s = xScale;
-            return 0;
-        }));
+        int64_t* s = static_cast<int64_t*>(p);
+        *s = xScale;
+        return 0;
+    }));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_exit_container(IsNull()))
         .WillOnce(Return(0))  /* variant. */
@@ -312,18 +312,18 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            const char** s = static_cast<const char**>(p);
-            // Read the first parameter, the string.
-            *s = intf;
-            return 0;
-        }))
+        const char** s = static_cast<const char**>(p);
+        // Read the first parameter, the string.
+        *s = intf;
+        return 0;
+    }))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            const char** s = static_cast<const char**>(p);
-            *s = criticalAlarm;
-            // Read the string in the pair (dictionary).
-            return 0;
-        }));
+        const char** s = static_cast<const char**>(p);
+        *s = criticalAlarm;
+        // Read the string in the pair (dictionary).
+        return 0;
+    }));
 
     // std::map
     EXPECT_CALL(sdbus_mock,
@@ -356,10 +356,10 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'b', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            bool* s = static_cast<bool*>(p);
-            *s = alarm;
-            return 0;
-        }));
+        bool* s = static_cast<bool*>(p);
+        *s = alarm;
+        return 0;
+    }));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_exit_container(IsNull()))
         .WillOnce(Return(0))  /* variant. */
@@ -389,18 +389,18 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            const char** s = static_cast<const char**>(p);
-            // Read the first parameter, the string.
-            *s = intf;
-            return 0;
-        }))
+        const char** s = static_cast<const char**>(p);
+        // Read the first parameter, the string.
+        *s = intf;
+        return 0;
+    }))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            const char** s = static_cast<const char**>(p);
-            *s = criticalAlarm;
-            // Read the string in the pair (dictionary).
-            return 0;
-        }));
+        const char** s = static_cast<const char**>(p);
+        *s = criticalAlarm;
+        // Read the string in the pair (dictionary).
+        return 0;
+    }));
 
     // std::map
     EXPECT_CALL(sdbus_mock,
@@ -433,10 +433,10 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'b', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            bool* s = static_cast<bool*>(p);
-            *s = alarm;
-            return 0;
-        }));
+        bool* s = static_cast<bool*>(p);
+        *s = alarm;
+        return 0;
+    }));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_exit_container(IsNull()))
         .WillOnce(Return(0))  /* variant. */
@@ -466,18 +466,18 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            const char** s = static_cast<const char**>(p);
-            // Read the first parameter, the string.
-            *s = intf;
-            return 0;
-        }))
+        const char** s = static_cast<const char**>(p);
+        // Read the first parameter, the string.
+        *s = intf;
+        return 0;
+    }))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            const char** s = static_cast<const char**>(p);
-            *s = property;
-            // Read the string in the pair (dictionary).
-            return 0;
-        }));
+        const char** s = static_cast<const char**>(p);
+        *s = property;
+        // Read the string in the pair (dictionary).
+        return 0;
+    }));
 
     // std::map
     EXPECT_CALL(sdbus_mock,
@@ -510,10 +510,10 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'b', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            bool* s = static_cast<bool*>(p);
-            *s = asserted;
-            return 0;
-        }));
+        bool* s = static_cast<bool*>(p);
+        *s = asserted;
+        return 0;
+    }));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_exit_container(IsNull()))
         .WillOnce(Return(0))  /* variant. */
@@ -545,18 +545,18 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            const char** s = static_cast<const char**>(p);
-            // Read the first parameter, the string.
-            *s = intf;
-            return 0;
-        }))
+        const char** s = static_cast<const char**>(p);
+        // Read the first parameter, the string.
+        *s = intf;
+        return 0;
+    }))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            const char** s = static_cast<const char**>(p);
-            *s = property;
-            // Read the string in the pair (dictionary).
-            return 0;
-        }));
+        const char** s = static_cast<const char**>(p);
+        *s = property;
+        // Read the string in the pair (dictionary).
+        return 0;
+    }));
 
     // std::map
     EXPECT_CALL(sdbus_mock,
@@ -589,10 +589,10 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'b', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            bool* s = static_cast<bool*>(p);
-            *s = asserted;
-            return 0;
-        }));
+        bool* s = static_cast<bool*>(p);
+        *s = asserted;
+        return 0;
+    }));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_exit_container(IsNull()))
         .WillOnce(Return(0))  /* variant. */
@@ -621,13 +621,13 @@
             .WillOnce(Invoke([&]([[maybe_unused]] const std::string& service,
                                  [[maybe_unused]] const std::string& path,
                                  SensorProperties* prop) {
-                prop->scale = _scale;
-                prop->value = _value;
-                prop->unit = "x";
-                prop->min = 0;
-                prop->max = 0;
-                prop->available = true;
-            }));
+            prop->scale = _scale;
+            prop->value = _value;
+            prop->unit = "x";
+            prop->min = 0;
+            prop->max = 0;
+            prop->available = true;
+        }));
         EXPECT_CALL(*helper, thresholdsAsserted(StrEq("asdf"), StrEq(path)))
             .WillOnce(Return(false));
 
@@ -669,18 +669,18 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            const char** s = static_cast<const char**>(p);
-            // Read the first parameter, the string.
-            *s = intf;
-            return 0;
-        }))
+        const char** s = static_cast<const char**>(p);
+        // Read the first parameter, the string.
+        *s = intf;
+        return 0;
+    }))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            const char** s = static_cast<const char**>(p);
-            *s = property;
-            // Read the string in the pair (dictionary).
-            return 0;
-        }));
+        const char** s = static_cast<const char**>(p);
+        *s = property;
+        // Read the string in the pair (dictionary).
+        return 0;
+    }));
 
     // std::map
     EXPECT_CALL(sdbus_mock,
@@ -713,10 +713,10 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'b', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            bool* s = static_cast<bool*>(p);
-            *s = asserted;
-            return 0;
-        }));
+        bool* s = static_cast<bool*>(p);
+        *s = asserted;
+        return 0;
+    }));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_exit_container(IsNull()))
         .WillOnce(Return(0))  /* variant. */
@@ -750,18 +750,18 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            const char** s = static_cast<const char**>(p);
-            // Read the first parameter, the string.
-            *s = intf;
-            return 0;
-        }))
+        const char** s = static_cast<const char**>(p);
+        // Read the first parameter, the string.
+        *s = intf;
+        return 0;
+    }))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            const char** s = static_cast<const char**>(p);
-            *s = property;
-            // Read the string in the pair (dictionary).
-            return 0;
-        }));
+        const char** s = static_cast<const char**>(p);
+        *s = property;
+        // Read the string in the pair (dictionary).
+        return 0;
+    }));
 
     // std::map
     EXPECT_CALL(sdbus_mock,
@@ -794,10 +794,10 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'b', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-            bool* s = static_cast<bool*>(p);
-            *s = asserted;
-            return 0;
-        }));
+        bool* s = static_cast<bool*>(p);
+        *s = asserted;
+        return 0;
+    }));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_exit_container(IsNull()))
         .WillOnce(Return(0))  /* variant. */
diff --git a/test/helpers.hpp b/test/helpers.hpp
index 4d3faea..378a4ae 100644
--- a/test/helpers.hpp
+++ b/test/helpers.hpp
@@ -66,9 +66,9 @@
                                        [[maybe_unused]] const char* path,
                                        [[maybe_unused]] const char* interface,
                                        const char** names) {
-                EXPECT_STREQ(properties[(*index)++].c_str(), names[0]);
-                return 0;
-            }));
+            EXPECT_STREQ(properties[(*index)++].c_str(), names[0]);
+            return 0;
+        }));
     }
 
     return;
diff --git a/test/pid_zone_unittest.cpp b/test/pid_zone_unittest.cpp
index 3a51d88..f0b96b1 100644
--- a/test/pid_zone_unittest.cpp
+++ b/test/pid_zone_unittest.cpp
@@ -190,7 +190,7 @@
                 [[maybe_unused]] const char* interface, const char** names) {
         EXPECT_STREQ("Enable", names[0]);
         return 0;
-        }));
+    }));
 
     zone->addPidControlProcess(sensorname, sensorType, setpoint,
                                bus_mock_enable, pidsensorpath.c_str(), defer);
@@ -248,7 +248,7 @@
                 [[maybe_unused]] const char* interface, const char** names) {
         EXPECT_STREQ("Enable", names[0]);
         return 0;
-        }));
+    }));
 
     zone->addPidControlProcess(sensorname, sensorType, setpoint,
                                bus_mock_enable, pidsensorpath.c_str(), defer);
@@ -292,7 +292,7 @@
                 [[maybe_unused]] const char* interface, const char** names) {
         EXPECT_STREQ("Enable", names[0]);
         return 0;
-        }));
+    }));
 
     zone->addPidControlProcess(sensorname, sensorType, setpoint,
                                bus_mock_enable, pidsensorpath.c_str(), defer);
@@ -708,7 +708,7 @@
                 [[maybe_unused]] const char* interface, const char** names) {
         EXPECT_STREQ("Manual", names[0]);
         return 0;
-        }));
+    }));
 
     // Method under test will set the manual mode to true and broadcast this
     // change on dbus.
diff --git a/test/sensor_host_unittest.cpp b/test/sensor_host_unittest.cpp
index 4fe0816..cb5ede4 100644
--- a/test/sensor_host_unittest.cpp
+++ b/test/sensor_host_unittest.cpp
@@ -95,7 +95,7 @@
                 [[maybe_unused]] const char* interface, const char** names) {
         EXPECT_STREQ("Value", names[0]);
         return 0;
-        }));
+    }));
 
     std::chrono::high_resolution_clock::time_point t1 =
         std::chrono::high_resolution_clock::now();