clang-format: fix pointer alignment, sort using

Change-Id: Id433d0ecc10c62807594b3a637e591045223faa6
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/.clang-format b/.clang-format
index 42a2307..ea71ad6 100644
--- a/.clang-format
+++ b/.clang-format
@@ -42,7 +42,7 @@
 ConstructorInitializerIndentWidth: 4
 ContinuationIndentWidth: 4
 Cpp11BracedListStyle: true
-DerivePointerAlignment: true
+DerivePointerAlignment: false
 PointerAlignment: Left
 DisableFormat:   false
 ExperimentalAutoDetectBinPacking: false
@@ -79,9 +79,9 @@
 PenaltyBreakString: 1000
 PenaltyExcessCharacter: 1000000
 PenaltyReturnTypeOnItsOwnLine: 60
-PointerAlignment: Right
 ReflowComments:  true
 SortIncludes:    true
+SortUsingDeclarations: true
 SpaceAfterCStyleCast: false
 SpaceBeforeAssignmentOperators: true
 SpaceBeforeParens: ControlStatements
diff --git a/dbus/dbusconfiguration.cpp b/dbus/dbusconfiguration.cpp
index c3ca365..e691dff 100644
--- a/dbus/dbusconfiguration.cpp
+++ b/dbus/dbusconfiguration.cpp
@@ -31,23 +31,23 @@
 std::map<int64_t, PIDConf> ZoneConfig = {};
 std::map<int64_t, struct zone> ZoneDetailsConfig = {};
 
-constexpr const char *pidConfigurationInterface =
+constexpr const char* pidConfigurationInterface =
     "xyz.openbmc_project.Configuration.Pid";
-constexpr const char *objectManagerInterface =
+constexpr const char* objectManagerInterface =
     "org.freedesktop.DBus.ObjectManager";
-constexpr const char *pidZoneConfigurationInterface =
+constexpr const char* pidZoneConfigurationInterface =
     "xyz.openbmc_project.Configuration.Pid.Zone";
-constexpr const char *sensorInterface = "xyz.openbmc_project.Sensor.Value";
-constexpr const char *pwmInterface = "xyz.openbmc_project.Control.FanPwm";
+constexpr const char* sensorInterface = "xyz.openbmc_project.Sensor.Value";
+constexpr const char* pwmInterface = "xyz.openbmc_project.Control.FanPwm";
 
 namespace dbus_configuration
 {
 
-bool findSensor(const std::unordered_map<std::string, std::string> &sensors,
-                const std::string &search,
-                std::pair<std::string, std::string> &sensor)
+bool findSensor(const std::unordered_map<std::string, std::string>& sensors,
+                const std::string& search,
+                std::pair<std::string, std::string>& sensor)
 {
-    for (const auto &s : sensors)
+    for (const auto& s : sensors)
     {
         if (s.first.find(search) != std::string::npos)
         {
@@ -66,7 +66,7 @@
     // print sensor config
     std::cout << "sensor config:\n";
     std::cout << "{\n";
-    for (auto &pair : SensorConfig)
+    for (auto& pair : SensorConfig)
     {
 
         std::cout << "\t{" << pair.first << ",\n\t\t{";
@@ -80,7 +80,7 @@
     std::cout << "}\n\n";
     std::cout << "ZoneDetailsConfig\n";
     std::cout << "{\n";
-    for (auto &zone : ZoneDetailsConfig)
+    for (auto& zone : ZoneDetailsConfig)
     {
         std::cout << "\t{" << zone.first << ",\n";
         std::cout << "\t\t{" << zone.second.minthermalrpm << ", ";
@@ -89,15 +89,15 @@
     std::cout << "}\n\n";
     std::cout << "ZoneConfig\n";
     std::cout << "{\n";
-    for (auto &zone : ZoneConfig)
+    for (auto& zone : ZoneConfig)
     {
         std::cout << "\t{" << zone.first << "\n";
-        for (auto &pidconf : zone.second)
+        for (auto& pidconf : zone.second)
         {
             std::cout << "\t\t{" << pidconf.first << ",\n";
             std::cout << "\t\t\t{" << pidconf.second.type << ",\n";
             std::cout << "\t\t\t{";
-            for (auto &input : pidconf.second.inputs)
+            for (auto& input : pidconf.second.inputs)
             {
                 std::cout << "\n\t\t\t" << input << ",\n";
             }
@@ -121,7 +121,7 @@
     std::cout << "}\n\n";
 }
 
-void init(sdbusplus::bus::bus &bus)
+void init(sdbusplus::bus::bus& bus)
 {
     using ManagedObjectType = std::unordered_map<
         sdbusplus::message::object_path,
@@ -134,7 +134,7 @@
 
     // install watch for properties changed
     std::function<void(sdbusplus::message::message & message)> eventHandler =
-        [](const sdbusplus::message::message &) {
+        [](const sdbusplus::message::message&) {
             // do a brief sleep as we tend to get a bunch of these events at
             // once
             std::this_thread::sleep_for(std::chrono::seconds(5));
@@ -153,10 +153,10 @@
                             "/xyz/openbmc_project/object_mapper",
                             "xyz.openbmc_project.ObjectMapper", "GetSubTree");
     mapper.append("", 0,
-                  std::array<const char *, 5>{objectManagerInterface,
-                                              pidConfigurationInterface,
-                                              pidZoneConfigurationInterface,
-                                              sensorInterface, pwmInterface});
+                  std::array<const char*, 5>{objectManagerInterface,
+                                             pidConfigurationInterface,
+                                             pidZoneConfigurationInterface,
+                                             sensorInterface, pwmInterface});
     auto resp = bus.call(mapper);
     if (resp.is_method_error())
     {
@@ -175,12 +175,12 @@
     std::unordered_map<std::string, std::pair<bool, std::string>> owners;
     // and a map of <path, interface> for sensors
     std::unordered_map<std::string, std::string> sensors;
-    for (const auto &objectPair : respData)
+    for (const auto& objectPair : respData)
     {
-        for (const auto &ownerPair : objectPair.second)
+        for (const auto& ownerPair : objectPair.second)
         {
-            auto &owner = owners[ownerPair.first];
-            for (const std::string &interface : ownerPair.second)
+            auto& owner = owners[ownerPair.first];
+            for (const std::string& interface : ownerPair.second)
             {
 
                 if (interface == objectManagerInterface)
@@ -206,7 +206,7 @@
         }
     }
     ManagedObjectType configurations;
-    for (const auto &owner : owners)
+    for (const auto& owner : owners)
     {
         // skip if no pid configuration (means probably a sensor)
         if (!owner.second.first)
@@ -224,7 +224,7 @@
         }
         ManagedObjectType configuration;
         responce.read(configuration);
-        for (auto &pathPair : configuration)
+        for (auto& pathPair : configuration)
         {
             if (pathPair.second.find(pidConfigurationInterface) !=
                     pathPair.second.end() ||
@@ -235,14 +235,14 @@
             }
         }
     }
-    for (const auto &configuration : configurations)
+    for (const auto& configuration : configurations)
     {
         auto findZone =
             configuration.second.find(pidZoneConfigurationInterface);
         if (findZone != configuration.second.end())
         {
-            const auto &zone = findZone->second;
-            auto &details =
+            const auto& zone = findZone->second;
+            auto& details =
                 ZoneDetailsConfig[sdbusplus::message::variant_ns::get<uint64_t>(
                     zone.at("Index"))];
             details.minthermalrpm = mapbox::util::apply_visitor(
@@ -256,15 +256,15 @@
             continue;
         }
         // if the base configuration is found, these are required
-        const auto &base = configuration.second.at(pidConfigurationInterface);
-        const auto &iLim = configuration.second.at(pidConfigurationInterface +
+        const auto& base = configuration.second.at(pidConfigurationInterface);
+        const auto& iLim = configuration.second.at(pidConfigurationInterface +
                                                    std::string(".ILimit"));
-        const auto &outLim = configuration.second.at(pidConfigurationInterface +
+        const auto& outLim = configuration.second.at(pidConfigurationInterface +
                                                      std::string(".OutLimit"));
-        PIDConf &conf =
+        PIDConf& conf =
             ZoneConfig[sdbusplus::message::variant_ns::get<uint64_t>(
                 base.at("Index"))];
-        struct controller_info &info =
+        struct controller_info& info =
             conf[sdbusplus::message::variant_ns::get<std::string>(
                 base.at("Name"))];
         info.type =
@@ -308,7 +308,7 @@
             sdbusplus::message::variant_ns::get<std::vector<std::string>>(
                 base.at("Inputs"));
 
-        for (const std::string &sensorName : sensorNames)
+        for (const std::string& sensorName : sensorNames)
         {
             std::string name = sensorName;
             // replace spaces with underscores to be legal on dbus
@@ -322,7 +322,7 @@
             if (sensorPathIfacePair.second == sensorInterface)
             {
                 info.inputs.push_back(name);
-                auto &config = SensorConfig[name];
+                auto& config = SensorConfig[name];
                 config.type = sdbusplus::message::variant_ns::get<std::string>(
                     base.at("Class"));
                 config.readpath = sensorPathIfacePair.first;
@@ -344,7 +344,7 @@
                     }
                     std::replace(otherSensor.begin(), otherSensor.end(), ' ',
                                  '_');
-                    auto &config = SensorConfig[otherSensor];
+                    auto& config = SensorConfig[otherSensor];
                     config.writepath = sensorPathIfacePair.first;
                     // todo: un-hardcode this if there are fans with different
                     // ranges
diff --git a/dbus/dbusconfiguration.hpp b/dbus/dbusconfiguration.hpp
index 9b5ef63..546ce15 100644
--- a/dbus/dbusconfiguration.hpp
+++ b/dbus/dbusconfiguration.hpp
@@ -20,5 +20,5 @@
 
 namespace dbus_configuration
 {
-void init(sdbusplus::bus::bus &bus);
+void init(sdbusplus::bus::bus& bus);
 } // namespace dbus_configuration
\ No newline at end of file
diff --git a/dbus/dbuswrite.hpp b/dbus/dbuswrite.hpp
index 6733721..0bdcde9 100644
--- a/dbus/dbuswrite.hpp
+++ b/dbus/dbuswrite.hpp
@@ -22,13 +22,13 @@
 #include <sdbusplus/bus.hpp>
 #include <string>
 
-constexpr const char *pwmInterface = "xyz.openbmc_project.Control.FanPwm";
+constexpr const char* pwmInterface = "xyz.openbmc_project.Control.FanPwm";
 
 class DbusWritePercent : public WriteInterface
 {
   public:
-    DbusWritePercent(const std::string &path, int64_t min, int64_t max,
-                     DbusHelperInterface &helper) :
+    DbusWritePercent(const std::string& path, int64_t min, int64_t max,
+                     DbusHelperInterface& helper) :
         WriteInterface(min, max),
         path(path)
     {
@@ -46,8 +46,8 @@
 class DbusWrite : public WriteInterface
 {
   public:
-    DbusWrite(const std::string &path, int64_t min, int64_t max,
-              DbusHelperInterface &helper) :
+    DbusWrite(const std::string& path, int64_t min, int64_t max,
+              DbusHelperInterface& helper) :
         WriteInterface(min, max),
         path(path)
     {
diff --git a/interfaces.hpp b/interfaces.hpp
index 1ebd1cb..bf45545 100644
--- a/interfaces.hpp
+++ b/interfaces.hpp
@@ -7,7 +7,7 @@
     double value;
     std::chrono::high_resolution_clock::time_point updated;
 
-    bool operator==(const ReadReturn &rhs) const
+    bool operator==(const ReadReturn& rhs) const
     {
         return (this->value == rhs.value && this->updated == rhs.updated);
     }
diff --git a/test/dbus_passive_unittest.cpp b/test/dbus_passive_unittest.cpp
index 6b8cc8e..961b380 100644
--- a/test/dbus_passive_unittest.cpp
+++ b/test/dbus_passive_unittest.cpp
@@ -51,8 +51,8 @@
 
     EXPECT_CALL(helper, GetProperties(_, StrEq("asdf"), StrEq(path), NotNull()))
         .WillOnce(
-            Invoke([&](sdbusplus::bus::bus &bus, const std::string &service,
-                       const std::string &path, struct SensorProperties *prop) {
+            Invoke([&](sdbusplus::bus::bus& bus, const std::string& service,
+                       const std::string& path, struct SensorProperties* prop) {
                 prop->scale = -3;
                 prop->value = 10;
                 prop->unit = "x";
@@ -75,15 +75,15 @@
         EXPECT_CALL(helper,
                     GetProperties(_, StrEq("asdf"), StrEq(path), NotNull()))
             .WillOnce(Invoke(
-                [&](sdbusplus::bus::bus &bus, const std::string &service,
-                    const std::string &path, struct SensorProperties *prop) {
+                [&](sdbusplus::bus::bus& bus, const std::string& service,
+                    const std::string& path, struct SensorProperties* prop) {
                     prop->scale = _scale;
                     prop->value = _value;
                     prop->unit = "x";
                 }));
 
         ri = DbusPassive::CreateDbusPassive(bus_mock, type, id, &helper);
-        passive = reinterpret_cast<DbusPassive *>(ri.get());
+        passive = reinterpret_cast<DbusPassive*>(ri.get());
         EXPECT_FALSE(passive == nullptr);
     }
 
@@ -97,7 +97,7 @@
     int64_t _value = 10;
 
     std::unique_ptr<ReadInterface> ri;
-    DbusPassive *passive;
+    DbusPassive* passive;
 };
 
 TEST_F(DbusPassiveTestObj, ReadReturnsExpectedValues)
@@ -144,21 +144,21 @@
         .WillOnce(Return(nullptr));
     sdbusplus::message::message msg(nullptr, &sdbus_mock);
 
-    const char *Value = "Value";
+    const char* Value = "Value";
     int64_t xValue = 10000;
-    const char *intf = "xyz.openbmc_project.Sensor.Value";
+    const char* intf = "xyz.openbmc_project.Sensor.Value";
     // string, std::map<std::string, sdbusplus::message::variant<int64_t>>
     // msg.read(msgSensor, msgData);
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
-        .WillOnce(Invoke([&](sd_bus_message *m, char type, void *p) {
-            const char **s = static_cast<const char **>(p);
+        .WillOnce(Invoke([&](sd_bus_message* m, char type, void* p) {
+            const char** s = static_cast<const char**>(p);
             // Read the first parameter, the string.
             *s = intf;
             return 0;
         }))
-        .WillOnce(Invoke([&](sd_bus_message *m, char type, void *p) {
-            const char **s = static_cast<const char **>(p);
+        .WillOnce(Invoke([&](sd_bus_message* m, char type, void* p) {
+            const char** s = static_cast<const char**>(p);
             *s = Value;
             // Read the string in the pair (dictionary).
             return 0;
@@ -187,8 +187,8 @@
         .WillOnce(Return(0));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'x', NotNull()))
-        .WillOnce(Invoke([&](sd_bus_message *m, char type, void *p) {
-            int64_t *s = static_cast<int64_t *>(p);
+        .WillOnce(Invoke([&](sd_bus_message* m, char type, void* p) {
+            int64_t* s = static_cast<int64_t*>(p);
             *s = xValue;
             return 0;
         }));
@@ -214,21 +214,21 @@
         .WillOnce(Return(nullptr));
     sdbusplus::message::message msg(nullptr, &sdbus_mock);
 
-    const char *Scale = "Scale";
+    const char* Scale = "Scale";
     int64_t xScale = -6;
-    const char *intf = "xyz.openbmc_project.Sensor.Value";
+    const char* intf = "xyz.openbmc_project.Sensor.Value";
     // string, std::map<std::string, sdbusplus::message::variant<int64_t>>
     // msg.read(msgSensor, msgData);
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
-        .WillOnce(Invoke([&](sd_bus_message *m, char type, void *p) {
-            const char **s = static_cast<const char **>(p);
+        .WillOnce(Invoke([&](sd_bus_message* m, char type, void* p) {
+            const char** s = static_cast<const char**>(p);
             // Read the first parameter, the string.
             *s = intf;
             return 0;
         }))
-        .WillOnce(Invoke([&](sd_bus_message *m, char type, void *p) {
-            const char **s = static_cast<const char **>(p);
+        .WillOnce(Invoke([&](sd_bus_message* m, char type, void* p) {
+            const char** s = static_cast<const char**>(p);
             *s = Scale;
             // Read the string in the pair (dictionary).
             return 0;
@@ -257,8 +257,8 @@
         .WillOnce(Return(0));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'x', NotNull()))
-        .WillOnce(Invoke([&](sd_bus_message *m, char type, void *p) {
-            int64_t *s = static_cast<int64_t *>(p);
+        .WillOnce(Invoke([&](sd_bus_message* m, char type, void* p) {
+            int64_t* s = static_cast<int64_t*>(p);
             *s = xScale;
             return 0;
         }));
diff --git a/test/helpers.hpp b/test/helpers.hpp
index a06eb2e..6952c52 100644
--- a/test/helpers.hpp
+++ b/test/helpers.hpp
@@ -34,9 +34,9 @@
  * @param[in] properties - an ordered list of expected property updates.
  * @param[in] index - a pointer to a valid integer in a surviving scope.
  */
-void SetupDbusObject(sdbusplus::SdBusMock *sdbus_mock, bool defer,
-                     const std::string &path, const std::string &intf,
-                     const std::vector<std::string> &properties, int *index)
+void SetupDbusObject(sdbusplus::SdBusMock* sdbus_mock, bool defer,
+                     const std::string& path, const std::string& intf,
+                     const std::vector<std::string>& properties, int* index)
 {
     EXPECT_CALL(*sdbus_mock,
                 sd_bus_add_object_vtable(IsNull(), NotNull(), StrEq(path),
@@ -57,8 +57,8 @@
                     sd_bus_emit_properties_changed_strv(IsNull(), StrEq(path),
                                                         StrEq(intf), NotNull()))
             .Times(properties.size())
-            .WillRepeatedly(Invoke([=](sd_bus *bus, const char *path,
-                                       const char *interface, char **names) {
+            .WillRepeatedly(Invoke([=](sd_bus* bus, const char* path,
+                                       const char* interface, char** names) {
                 EXPECT_STREQ(properties[(*index)++].c_str(), names[0]);
                 return 0;
             }));
diff --git a/test/pid_fancontroller_unittest.cpp b/test/pid_fancontroller_unittest.cpp
index c7b7bc7..17291f9 100644
--- a/test/pid_fancontroller_unittest.cpp
+++ b/test/pid_fancontroller_unittest.cpp
@@ -117,7 +117,7 @@
         FanController::CreateFanPid(&z, "fan1", inputs, initial);
     EXPECT_FALSE(p == nullptr);
     // Grab pointer for mocking.
-    FanController *fp = reinterpret_cast<FanController *>(p.get());
+    FanController* fp = reinterpret_cast<FanController*>(p.get());
 
     // Fanspeed starts are Neutral.
     EXPECT_EQ(FanSpeedDirection::NEUTRAL, fp->getFanDirection());
@@ -163,8 +163,8 @@
     std::unique_ptr<Sensor> s1 = std::make_unique<SensorMock>("fan0", timeout);
     std::unique_ptr<Sensor> s2 = std::make_unique<SensorMock>("fan1", timeout);
     // Grab pointers for mocking.
-    SensorMock *sm1 = reinterpret_cast<SensorMock *>(s1.get());
-    SensorMock *sm2 = reinterpret_cast<SensorMock *>(s2.get());
+    SensorMock* sm1 = reinterpret_cast<SensorMock*>(s1.get());
+    SensorMock* sm2 = reinterpret_cast<SensorMock*>(s2.get());
 
     EXPECT_CALL(z, getSensor(StrEq("fan0"))).WillOnce(Return(s1.get()));
     EXPECT_CALL(*sm1, write(0.75));
@@ -199,8 +199,8 @@
     std::unique_ptr<Sensor> s1 = std::make_unique<SensorMock>("fan0", timeout);
     std::unique_ptr<Sensor> s2 = std::make_unique<SensorMock>("fan1", timeout);
     // Grab pointers for mocking.
-    SensorMock *sm1 = reinterpret_cast<SensorMock *>(s1.get());
-    SensorMock *sm2 = reinterpret_cast<SensorMock *>(s2.get());
+    SensorMock* sm1 = reinterpret_cast<SensorMock*>(s1.get());
+    SensorMock* sm2 = reinterpret_cast<SensorMock*>(s2.get());
 
     EXPECT_CALL(z, getSensor(StrEq("fan0"))).WillOnce(Return(s1.get()));
     EXPECT_CALL(*sm1, write(0.5));
@@ -232,7 +232,7 @@
     int64_t timeout = 0;
     std::unique_ptr<Sensor> s1 = std::make_unique<SensorMock>("fan0", timeout);
     // Grab pointer for mocking.
-    SensorMock *sm1 = reinterpret_cast<SensorMock *>(s1.get());
+    SensorMock* sm1 = reinterpret_cast<SensorMock*>(s1.get());
 
     // Converting from float to double for expectation.
     float percent = 80;
diff --git a/test/pid_zone_unittest.cpp b/test/pid_zone_unittest.cpp
index a8e03a0..44df7b1 100644
--- a/test/pid_zone_unittest.cpp
+++ b/test/pid_zone_unittest.cpp
@@ -40,7 +40,7 @@
     SensorManager m(std::move(bus_mock_passive), std::move(bus_mock_host));
 
     bool defer = true;
-    const char *objPath = "/path/";
+    const char* objPath = "/path/";
     int64_t zone = 1;
     float minThermalRpm = 1000.0;
     float failSafePercent = 0.75;
@@ -95,7 +95,7 @@
     float minThermalRpm = 1000.0;
     float failSafePercent = 0.75;
     bool defer = true;
-    const char *objPath = "/path/";
+    const char* objPath = "/path/";
     SensorManager mgr;
 
     std::unique_ptr<PIDZone> zone;
@@ -177,12 +177,12 @@
 
     std::unique_ptr<Sensor> sensor1 =
         std::make_unique<SensorMock>(name1, timeout);
-    SensorMock *sensor_ptr1 = reinterpret_cast<SensorMock *>(sensor1.get());
+    SensorMock* sensor_ptr1 = reinterpret_cast<SensorMock*>(sensor1.get());
 
     std::string name2 = "temp2";
     std::unique_ptr<Sensor> sensor2 =
         std::make_unique<SensorMock>(name2, timeout);
-    SensorMock *sensor_ptr2 = reinterpret_cast<SensorMock *>(sensor2.get());
+    SensorMock* sensor_ptr2 = reinterpret_cast<SensorMock*>(sensor2.get());
 
     std::string type = "unchecked";
     mgr.addSensor(type, name1, std::move(sensor1));
@@ -229,12 +229,12 @@
 
     std::unique_ptr<Sensor> sensor1 =
         std::make_unique<SensorMock>(name1, timeout);
-    SensorMock *sensor_ptr1 = reinterpret_cast<SensorMock *>(sensor1.get());
+    SensorMock* sensor_ptr1 = reinterpret_cast<SensorMock*>(sensor1.get());
 
     std::string name2 = "fan2";
     std::unique_ptr<Sensor> sensor2 =
         std::make_unique<SensorMock>(name2, timeout);
-    SensorMock *sensor_ptr2 = reinterpret_cast<SensorMock *>(sensor2.get());
+    SensorMock* sensor_ptr2 = reinterpret_cast<SensorMock*>(sensor2.get());
 
     std::string type = "unchecked";
     mgr.addSensor(type, name1, std::move(sensor1));
@@ -277,12 +277,12 @@
     std::string name1 = "temp1";
     std::unique_ptr<Sensor> sensor1 =
         std::make_unique<SensorMock>(name1, timeout);
-    SensorMock *sensor_ptr1 = reinterpret_cast<SensorMock *>(sensor1.get());
+    SensorMock* sensor_ptr1 = reinterpret_cast<SensorMock*>(sensor1.get());
 
     std::string name2 = "temp2";
     std::unique_ptr<Sensor> sensor2 =
         std::make_unique<SensorMock>(name2, timeout);
-    SensorMock *sensor_ptr2 = reinterpret_cast<SensorMock *>(sensor2.get());
+    SensorMock* sensor_ptr2 = reinterpret_cast<SensorMock*>(sensor2.get());
 
     std::string type = "unchecked";
     mgr.addSensor(type, name1, std::move(sensor1));
@@ -336,7 +336,7 @@
     std::string name1 = "temp1";
     std::unique_ptr<Sensor> sensor1 =
         std::make_unique<SensorMock>(name1, timeout);
-    SensorMock *sensor_ptr1 = reinterpret_cast<SensorMock *>(sensor1.get());
+    SensorMock* sensor_ptr1 = reinterpret_cast<SensorMock*>(sensor1.get());
 
     std::string type = "unchecked";
     mgr.addSensor(type, name1, std::move(sensor1));
@@ -355,11 +355,11 @@
 
     std::unique_ptr<PIDController> tpid =
         std::make_unique<ControllerMock>("thermal1", zone.get());
-    ControllerMock *tmock = reinterpret_cast<ControllerMock *>(tpid.get());
+    ControllerMock* tmock = reinterpret_cast<ControllerMock*>(tpid.get());
 
     // Access the internal pid configuration to clear it out (unrelated to the
     // test).
-    ec::pid_info_t *info = tpid->get_pid_info();
+    ec::pid_info_t* info = tpid->get_pid_info();
     std::memset(info, 0x00, sizeof(ec::pid_info_t));
 
     zone->addThermalPID(std::move(tpid));
@@ -380,11 +380,11 @@
 
     std::unique_ptr<PIDController> tpid =
         std::make_unique<ControllerMock>("fan1", zone.get());
-    ControllerMock *tmock = reinterpret_cast<ControllerMock *>(tpid.get());
+    ControllerMock* tmock = reinterpret_cast<ControllerMock*>(tpid.get());
 
     // Access the internal pid configuration to clear it out (unrelated to the
     // test).
-    ec::pid_info_t *info = tpid->get_pid_info();
+    ec::pid_info_t* info = tpid->get_pid_info();
     std::memset(info, 0x00, sizeof(ec::pid_info_t));
 
     zone->addFanPID(std::move(tpid));
@@ -406,8 +406,8 @@
     EXPECT_CALL(sdbus_mock_mode,
                 sd_bus_emit_properties_changed_strv(
                     IsNull(), StrEq(objPath), StrEq(modeInterface), NotNull()))
-        .WillOnce(Invoke([&](sd_bus *bus, const char *path,
-                             const char *interface, char **names) {
+        .WillOnce(Invoke([&](sd_bus* bus, const char* path,
+                             const char* interface, char** names) {
             EXPECT_STREQ("Manual", names[0]);
             return 0;
         }));
diff --git a/test/sensor_host_unittest.cpp b/test/sensor_host_unittest.cpp
index 99d4924..1c69a20 100644
--- a/test/sensor_host_unittest.cpp
+++ b/test/sensor_host_unittest.cpp
@@ -29,7 +29,7 @@
     auto bus_mock = sdbusplus::get_mocked_new(&sdbus_mock);
     std::string name = "fleeting0";
     int64_t timeout = 1;
-    const char *objPath = "/asdf/asdf0";
+    const char* objPath = "/asdf/asdf0";
     bool defer = false;
     std::string interface = "xyz.openbmc_project.Sensor.Value";
 
@@ -62,7 +62,7 @@
     auto bus_mock = sdbusplus::get_mocked_new(&sdbus_mock);
     std::string name = "fleeting0";
     int64_t timeout = 1;
-    const char *objPath = "/asdf/asdf0";
+    const char* objPath = "/asdf/asdf0";
     bool defer = false;
     std::string interface = "xyz.openbmc_project.Sensor.Value";
 
@@ -83,7 +83,7 @@
         HostSensor::CreateTemp(name, timeout, bus_mock, objPath, defer);
 
     // Value is updated from dbus calls only (normally).
-    HostSensor *hs = static_cast<HostSensor *>(s.get());
+    HostSensor* hs = static_cast<HostSensor*>(s.get());
     int64_t new_value = 2;
 
     ReadReturn r = hs->read();
@@ -92,8 +92,8 @@
     EXPECT_CALL(sdbus_mock,
                 sd_bus_emit_properties_changed_strv(
                     IsNull(), StrEq(objPath), StrEq(interface), NotNull()))
-        .WillOnce(Invoke([=](sd_bus *bus, const char *path,
-                             const char *interface, char **names) {
+        .WillOnce(Invoke([=](sd_bus* bus, const char* path,
+                             const char* interface, char** names) {
             EXPECT_STREQ("Value", names[0]);
             return 0;
         }));
diff --git a/test/sensor_manager_unittest.cpp b/test/sensor_manager_unittest.cpp
index 54253ac..8a89628 100644
--- a/test/sensor_manager_unittest.cpp
+++ b/test/sensor_manager_unittest.cpp
@@ -50,7 +50,7 @@
     int64_t timeout = 1;
     std::unique_ptr<Sensor> sensor =
         std::make_unique<SensorMock>(name, timeout);
-    Sensor *sensor_ptr = sensor.get();
+    Sensor* sensor_ptr = sensor.get();
 
     s.addSensor(type, name, std::move(sensor));
     EXPECT_EQ(s.getSensor(name), sensor_ptr);
diff --git a/test/sensor_pluggable_unittest.cpp b/test/sensor_pluggable_unittest.cpp
index 015b911..a15f06c 100644
--- a/test/sensor_pluggable_unittest.cpp
+++ b/test/sensor_pluggable_unittest.cpp
@@ -41,7 +41,7 @@
     std::string name = "name";
     int64_t timeout = 1;
 
-    ReadInterfaceMock *rip = reinterpret_cast<ReadInterfaceMock *>(ri.get());
+    ReadInterfaceMock* rip = reinterpret_cast<ReadInterfaceMock*>(ri.get());
 
     PluggableSensor p(name, timeout, std::move(ri), std::move(wi));
 
@@ -71,7 +71,7 @@
     std::string name = "name";
     int64_t timeout = 1;
 
-    WriteInterfaceMock *wip = reinterpret_cast<WriteInterfaceMock *>(wi.get());
+    WriteInterfaceMock* wip = reinterpret_cast<WriteInterfaceMock*>(wi.get());
 
     PluggableSensor p(name, timeout, std::move(ri), std::move(wi));