update clang-format from Latest in docs
Updates the clang-format file and then applies it.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ia9faf13ce171f90bf07547efd781139bee23e8c7
diff --git a/.clang-format b/.clang-format
index ea71ad6..52ac0a1 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: true
+AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
+ AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
@@ -29,15 +29,22 @@
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
@@ -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
@@ -83,8 +94,13 @@
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
@@ -92,7 +108,7 @@
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
-Standard: Cpp11
+Standard: Latest
TabWidth: 4
UseTab: Never
...
diff --git a/build/buildjson.cpp b/build/buildjson.cpp
index a5ae502..14253e8 100644
--- a/build/buildjson.cpp
+++ b/build/buildjson.cpp
@@ -2,9 +2,10 @@
#include "errors/exception.hpp"
-#include <fstream>
#include <nlohmann/json.hpp>
+#include <fstream>
+
using json = nlohmann::json;
void validateJson(const json& data)
diff --git a/build/buildjson.hpp b/build/buildjson.hpp
index afc90df..d7ab38f 100644
--- a/build/buildjson.hpp
+++ b/build/buildjson.hpp
@@ -1,6 +1,7 @@
#pragma once
#include <nlohmann/json.hpp>
+
#include <string>
using json = nlohmann::json;
diff --git a/dbus/dbusactiveread.hpp b/dbus/dbusactiveread.hpp
index 235f038..37ff9bc 100644
--- a/dbus/dbusactiveread.hpp
+++ b/dbus/dbusactiveread.hpp
@@ -3,8 +3,9 @@
#include "interfaces.hpp"
#include "util.hpp"
-#include <memory>
#include <sdbusplus/bus.hpp>
+
+#include <memory>
#include <string>
/*
@@ -18,8 +19,7 @@
const std::string& service, DbusHelperInterface* helper) :
ReadInterface(),
_bus(bus), _path(path), _service(service), _helper(helper)
- {
- }
+ {}
ReadReturn read(void) override;
diff --git a/dbus/dbusconfiguration.cpp b/dbus/dbusconfiguration.cpp
index bfa2a7c..e1ca91c 100644
--- a/dbus/dbusconfiguration.cpp
+++ b/dbus/dbusconfiguration.cpp
@@ -17,16 +17,17 @@
#include "conf.hpp"
#include "util.hpp"
-#include <algorithm>
#include <boost/asio/steady_timer.hpp>
+#include <sdbusplus/bus.hpp>
+#include <sdbusplus/bus/match.hpp>
+#include <sdbusplus/exception.hpp>
+
+#include <algorithm>
#include <chrono>
#include <functional>
#include <iostream>
#include <list>
#include <regex>
-#include <sdbusplus/bus.hpp>
-#include <sdbusplus/bus/match.hpp>
-#include <sdbusplus/exception.hpp>
#include <set>
#include <unordered_map>
#include <variant>
diff --git a/dbus/dbuspassive.cpp b/dbus/dbuspassive.cpp
index 02d1beb..5cd8ca4 100644
--- a/dbus/dbuspassive.cpp
+++ b/dbus/dbuspassive.cpp
@@ -18,11 +18,12 @@
#include "dbuspassiveredundancy.hpp"
#include "util.hpp"
+#include <sdbusplus/bus.hpp>
+
#include <chrono>
#include <cmath>
#include <memory>
#include <mutex>
-#include <sdbusplus/bus.hpp>
#include <string>
#include <variant>
diff --git a/dbus/dbuspassive.hpp b/dbus/dbuspassive.hpp
index 91733e9..16cf856 100644
--- a/dbus/dbuspassive.hpp
+++ b/dbus/dbuspassive.hpp
@@ -5,15 +5,16 @@
#include "interfaces.hpp"
#include "util.hpp"
+#include <sdbusplus/bus.hpp>
+#include <sdbusplus/message.hpp>
+#include <sdbusplus/server.hpp>
+
#include <chrono>
#include <cmath>
#include <iostream>
#include <map>
#include <memory>
#include <mutex>
-#include <sdbusplus/bus.hpp>
-#include <sdbusplus/message.hpp>
-#include <sdbusplus/server.hpp>
#include <set>
#include <string>
#include <tuple>
diff --git a/dbus/dbuspassiveredundancy.cpp b/dbus/dbuspassiveredundancy.cpp
index c7a1d0f..11533f2 100644
--- a/dbus/dbuspassiveredundancy.cpp
+++ b/dbus/dbuspassiveredundancy.cpp
@@ -16,9 +16,10 @@
#include "dbuspassiveredundancy.hpp"
-#include <iostream>
#include <sdbusplus/bus.hpp>
#include <sdbusplus/bus/match.hpp>
+
+#include <iostream>
#include <set>
#include <unordered_map>
#include <variant>
diff --git a/dbus/dbuspassiveredundancy.hpp b/dbus/dbuspassiveredundancy.hpp
index 7330baa..1c5c975 100644
--- a/dbus/dbuspassiveredundancy.hpp
+++ b/dbus/dbuspassiveredundancy.hpp
@@ -18,6 +18,7 @@
#include <sdbusplus/bus.hpp>
#include <sdbusplus/bus/match.hpp>
+
#include <set>
/*
diff --git a/dbus/dbuswrite.cpp b/dbus/dbuswrite.cpp
index 76f4ada..2cff7ea 100644
--- a/dbus/dbuswrite.cpp
+++ b/dbus/dbuswrite.cpp
@@ -16,10 +16,11 @@
#include "dbus/dbuswrite.hpp"
-#include <iostream>
-#include <memory>
#include <phosphor-logging/log.hpp>
#include <sdbusplus/bus.hpp>
+
+#include <iostream>
+#include <memory>
#include <string>
#include <variant>
diff --git a/dbus/dbuswrite.hpp b/dbus/dbuswrite.hpp
index 757ea9b..b8a6035 100644
--- a/dbus/dbuswrite.hpp
+++ b/dbus/dbuswrite.hpp
@@ -19,8 +19,9 @@
#include "interfaces.hpp"
#include "util.hpp"
-#include <memory>
#include <sdbusplus/bus.hpp>
+
+#include <memory>
#include <string>
class DbusWritePercent : public WriteInterface
@@ -34,8 +35,7 @@
const std::string& connectionName) :
WriteInterface(min, max),
path(path), connectionName(connectionName)
- {
- }
+ {}
void write(double value) override;
@@ -56,8 +56,7 @@
const std::string& connectionName) :
WriteInterface(min, max),
path(path), connectionName(connectionName)
- {
- }
+ {}
void write(double value) override;
diff --git a/dbus/util.cpp b/dbus/util.cpp
index 33e0985..93efc6d 100644
--- a/dbus/util.cpp
+++ b/dbus/util.cpp
@@ -1,8 +1,9 @@
#include "util.hpp"
+#include <phosphor-logging/log.hpp>
+
#include <cmath>
#include <iostream>
-#include <phosphor-logging/log.hpp>
#include <set>
#include <variant>
diff --git a/errors/exception.hpp b/errors/exception.hpp
index 9f2f2bc..889b98a 100644
--- a/errors/exception.hpp
+++ b/errors/exception.hpp
@@ -7,8 +7,7 @@
{
public:
explicit SensorBuildException(const std::string& message) : message(message)
- {
- }
+ {}
virtual const char* what() const noexcept override
{
@@ -24,8 +23,7 @@
public:
explicit ControllerBuildException(const std::string& message) :
message(message)
- {
- }
+ {}
virtual const char* what() const noexcept override
{
@@ -41,8 +39,7 @@
public:
explicit ConfigurationException(const std::string& message) :
message(message)
- {
- }
+ {}
virtual const char* what() const noexcept override
{
diff --git a/interfaces.hpp b/interfaces.hpp
index 89ef128..2002a61 100644
--- a/interfaces.hpp
+++ b/interfaces.hpp
@@ -21,12 +21,10 @@
{
public:
ReadInterface()
- {
- }
+ {}
virtual ~ReadInterface()
- {
- }
+ {}
virtual ReadReturn read(void) = 0;
@@ -44,12 +42,10 @@
{
public:
WriteInterface(int64_t min, int64_t max) : _min(min), _max(max)
- {
- }
+ {}
virtual ~WriteInterface()
- {
- }
+ {}
virtual void write(double value) = 0;
diff --git a/ipmi/manualcmds.cpp b/ipmi/manualcmds.cpp
index ce6bb94..9341d85 100644
--- a/ipmi/manualcmds.cpp
+++ b/ipmi/manualcmds.cpp
@@ -21,9 +21,10 @@
#include <ipmid/iana.hpp>
#include <ipmid/oemopenbmc.hpp>
#include <ipmid/oemrouter.hpp>
-#include <map>
#include <sdbusplus/bus.hpp>
#include <sdbusplus/message.hpp>
+
+#include <map>
#include <string>
#include <tuple>
#include <variant>
diff --git a/main.cpp b/main.cpp
index 2ab3fc4..1dbb072 100644
--- a/main.cpp
+++ b/main.cpp
@@ -32,13 +32,14 @@
#include <CLI/CLI.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/steady_timer.hpp>
+#include <sdbusplus/asio/connection.hpp>
+#include <sdbusplus/bus.hpp>
+
#include <chrono>
#include <iostream>
#include <list>
#include <map>
#include <memory>
-#include <sdbusplus/asio/connection.hpp>
-#include <sdbusplus/bus.hpp>
#include <thread>
#include <unordered_map>
#include <utility>
diff --git a/notimpl/readonly.hpp b/notimpl/readonly.hpp
index 2929b75..6a48f0b 100644
--- a/notimpl/readonly.hpp
+++ b/notimpl/readonly.hpp
@@ -8,8 +8,7 @@
{
public:
ReadOnly() : WriteInterface(0, 0)
- {
- }
+ {}
void write(double value) override;
};
@@ -18,8 +17,7 @@
{
public:
ReadOnlyNoExcept() : WriteInterface(0, 0)
- {
- }
+ {}
void write(double value) override;
};
diff --git a/notimpl/writeonly.hpp b/notimpl/writeonly.hpp
index 6dc7afd..ba7c0c4 100644
--- a/notimpl/writeonly.hpp
+++ b/notimpl/writeonly.hpp
@@ -7,8 +7,7 @@
{
public:
WriteOnly() : ReadInterface()
- {
- }
+ {}
ReadReturn read(void) override;
};
diff --git a/pid/builder.cpp b/pid/builder.cpp
index 2787bf0..0ffadf1 100644
--- a/pid/builder.cpp
+++ b/pid/builder.cpp
@@ -22,9 +22,10 @@
#include "pid/stepwisecontroller.hpp"
#include "pid/thermalcontroller.hpp"
+#include <sdbusplus/bus.hpp>
+
#include <iostream>
#include <memory>
-#include <sdbusplus/bus.hpp>
#include <unordered_map>
static constexpr bool deferSignals = true;
diff --git a/pid/builder.hpp b/pid/builder.hpp
index 2a83f3f..a493a67 100644
--- a/pid/builder.hpp
+++ b/pid/builder.hpp
@@ -3,8 +3,9 @@
#include "pid/zone.hpp"
#include "sensors/manager.hpp"
-#include <memory>
#include <sdbusplus/bus.hpp>
+
+#include <memory>
#include <unordered_map>
std::unordered_map<int64_t, std::unique_ptr<PIDZone>>
diff --git a/pid/buildjson.cpp b/pid/buildjson.cpp
index 5e90c47..9b3937b 100644
--- a/pid/buildjson.cpp
+++ b/pid/buildjson.cpp
@@ -18,8 +18,9 @@
#include "conf.hpp"
-#include <map>
#include <nlohmann/json.hpp>
+
+#include <map>
#include <tuple>
using json = nlohmann::json;
diff --git a/pid/buildjson.hpp b/pid/buildjson.hpp
index d4e86a7..2ac573a 100644
--- a/pid/buildjson.hpp
+++ b/pid/buildjson.hpp
@@ -2,8 +2,9 @@
#include "conf.hpp"
-#include <map>
#include <nlohmann/json.hpp>
+
+#include <map>
#include <tuple>
using json = nlohmann::json;
diff --git a/pid/fancontroller.hpp b/pid/fancontroller.hpp
index f3d3f4e..d14aef7 100644
--- a/pid/fancontroller.hpp
+++ b/pid/fancontroller.hpp
@@ -25,8 +25,7 @@
ZoneInterface* owner) :
PIDController(id, owner),
_inputs(inputs), _direction(FanSpeedDirection::NEUTRAL)
- {
- }
+ {}
double inputProc(void) override;
double setptProc(void) override;
diff --git a/pid/pidcontroller.hpp b/pid/pidcontroller.hpp
index 0b491e7..fd41c09 100644
--- a/pid/pidcontroller.hpp
+++ b/pid/pidcontroller.hpp
@@ -19,12 +19,10 @@
public:
PIDController(const std::string& id, ZoneInterface* owner) :
Controller(), _owner(owner), _setpoint(0), _id(id)
- {
- }
+ {}
virtual ~PIDController()
- {
- }
+ {}
virtual double inputProc(void) override = 0;
virtual double setptProc(void) = 0;
diff --git a/pid/pidloop.cpp b/pid/pidloop.cpp
index 56bf8bd..8dc6221 100644
--- a/pid/pidloop.cpp
+++ b/pid/pidloop.cpp
@@ -21,6 +21,7 @@
#include "sensors/sensor.hpp"
#include <boost/asio/steady_timer.hpp>
+
#include <chrono>
#include <map>
#include <memory>
diff --git a/pid/stepwisecontroller.hpp b/pid/stepwisecontroller.hpp
index 4aa8116..90e2317 100644
--- a/pid/stepwisecontroller.hpp
+++ b/pid/stepwisecontroller.hpp
@@ -23,8 +23,7 @@
ZoneInterface* owner) :
Controller(),
_owner(owner), _id(id), _inputs(inputs)
- {
- }
+ {}
double inputProc(void) override;
diff --git a/pid/thermalcontroller.hpp b/pid/thermalcontroller.hpp
index fa5aa4d..74e85ab 100644
--- a/pid/thermalcontroller.hpp
+++ b/pid/thermalcontroller.hpp
@@ -48,8 +48,7 @@
const ThermalType& type, ZoneInterface* owner) :
PIDController(id, owner),
_inputs(inputs), type(type)
- {
- }
+ {}
double inputProc(void) override;
double setptProc(void) override;
diff --git a/pid/zone.hpp b/pid/zone.hpp
index 3cf4e59..dc2ceb8 100644
--- a/pid/zone.hpp
+++ b/pid/zone.hpp
@@ -7,15 +7,16 @@
#include "sensors/sensor.hpp"
#include "tuning.hpp"
+#include <sdbusplus/bus.hpp>
+#include <sdbusplus/server.hpp>
+#include <xyz/openbmc_project/Control/Mode/server.hpp>
+
#include <fstream>
#include <map>
#include <memory>
-#include <sdbusplus/bus.hpp>
-#include <sdbusplus/server.hpp>
#include <set>
#include <string>
#include <vector>
-#include <xyz/openbmc_project/Control/Mode/server.hpp>
template <typename... T>
using ServerObject = typename sdbusplus::server::object::object<T...>;
diff --git a/sensors/buildjson.cpp b/sensors/buildjson.cpp
index 482173d..7e5e29a 100644
--- a/sensors/buildjson.cpp
+++ b/sensors/buildjson.cpp
@@ -19,9 +19,10 @@
#include "conf.hpp"
#include "sensors/sensor.hpp"
-#include <cstdio>
#include <nlohmann/json.hpp>
+#include <cstdio>
+
using json = nlohmann::json;
namespace conf
diff --git a/sensors/buildjson.hpp b/sensors/buildjson.hpp
index 0a38b93..979cd87 100644
--- a/sensors/buildjson.hpp
+++ b/sensors/buildjson.hpp
@@ -2,8 +2,9 @@
#include "conf.hpp"
-#include <map>
#include <nlohmann/json.hpp>
+
+#include <map>
#include <string>
using json = nlohmann::json;
diff --git a/sensors/host.hpp b/sensors/host.hpp
index 82b1747..7983e8a 100644
--- a/sensors/host.hpp
+++ b/sensors/host.hpp
@@ -2,13 +2,14 @@
#include "sensor.hpp"
-#include <memory>
-#include <mutex>
#include <sdbusplus/bus.hpp>
#include <sdbusplus/server.hpp>
-#include <type_traits>
#include <xyz/openbmc_project/Sensor/Value/server.hpp>
+#include <memory>
+#include <mutex>
+#include <type_traits>
+
template <typename... T>
using ServerObject = typename sdbusplus::server::object::object<T...>;
@@ -45,8 +46,7 @@
sdbusplus::bus::bus& bus, const char* objPath, bool defer) :
Sensor(name, timeout),
ValueObject(bus, objPath, defer)
- {
- }
+ {}
ValueType value(ValueType value) override;
diff --git a/sensors/manager.hpp b/sensors/manager.hpp
index 411b302..740ef00 100644
--- a/sensors/manager.hpp
+++ b/sensors/manager.hpp
@@ -2,10 +2,11 @@
#include "sensors/sensor.hpp"
-#include <map>
-#include <memory>
#include <sdbusplus/bus.hpp>
#include <sdbusplus/server.hpp>
+
+#include <map>
+#include <memory>
#include <string>
#include <vector>
diff --git a/sensors/pluggable.hpp b/sensors/pluggable.hpp
index 396a49c..756b5cb 100644
--- a/sensors/pluggable.hpp
+++ b/sensors/pluggable.hpp
@@ -3,8 +3,9 @@
#include "interfaces.hpp"
#include "sensor.hpp"
-#include <memory>
#include <sdbusplus/bus.hpp>
+
+#include <memory>
#include <string>
/*
@@ -18,8 +19,7 @@
std::unique_ptr<WriteInterface> writer) :
Sensor(name, timeout),
_reader(std::move(reader)), _writer(std::move(writer))
- {
- }
+ {}
ReadReturn read(void) override;
void write(double value) override;
diff --git a/sensors/sensor.hpp b/sensors/sensor.hpp
index 2dbfa30..a447ae0 100644
--- a/sensors/sensor.hpp
+++ b/sensors/sensor.hpp
@@ -27,12 +27,10 @@
Sensor(const std::string& name, int64_t timeout) :
_name(name), _timeout(timeout)
- {
- }
+ {}
virtual ~Sensor()
- {
- }
+ {}
virtual ReadReturn read(void) = 0;
virtual void write(double value) = 0;
diff --git a/setsensor.cpp b/setsensor.cpp
index d1c9e53..60ce21a 100644
--- a/setsensor.cpp
+++ b/setsensor.cpp
@@ -1,6 +1,7 @@
-#include <iostream>
#include <sdbusplus/bus.hpp>
#include <sdbusplus/message.hpp>
+
+#include <iostream>
#include <string>
#include <variant>
diff --git a/sysfs/sysfsread.hpp b/sysfs/sysfsread.hpp
index aa769c4..349caac 100644
--- a/sysfs/sysfsread.hpp
+++ b/sysfs/sysfsread.hpp
@@ -13,8 +13,7 @@
{
public:
SysFsRead(const std::string& path) : ReadInterface(), _path(FixupPath(path))
- {
- }
+ {}
ReadReturn read(void) override;
diff --git a/sysfs/sysfswrite.hpp b/sysfs/sysfswrite.hpp
index 990855e..276d936 100644
--- a/sysfs/sysfswrite.hpp
+++ b/sysfs/sysfswrite.hpp
@@ -14,8 +14,7 @@
public:
SysFsWritePercent(const std::string& writePath, int64_t min, int64_t max) :
WriteInterface(min, max), _writePath(FixupPath(writePath))
- {
- }
+ {}
void write(double value) override;
@@ -28,8 +27,7 @@
public:
SysFsWrite(const std::string& writePath, int64_t min, int64_t max) :
WriteInterface(min, max), _writePath(FixupPath(writePath))
- {
- }
+ {}
void write(double value) override;
diff --git a/test/controller_mock.hpp b/test/controller_mock.hpp
index 94c7cb5..52c21a9 100644
--- a/test/controller_mock.hpp
+++ b/test/controller_mock.hpp
@@ -11,8 +11,7 @@
ControllerMock(const std::string& id, PIDZone* owner) :
PIDController(id, owner)
- {
- }
+ {}
MOCK_METHOD0(inputProc, double());
MOCK_METHOD0(setptProc, double());
diff --git a/test/dbus_active_unittest.cpp b/test/dbus_active_unittest.cpp
index e6dcc9d..142cc1a 100644
--- a/test/dbus_active_unittest.cpp
+++ b/test/dbus_active_unittest.cpp
@@ -2,6 +2,7 @@
#include "test/dbushelper_mock.hpp"
#include <sdbusplus/test/sdbus_mock.hpp>
+
#include <string>
#include <gmock/gmock.h>
diff --git a/test/dbus_passive_unittest.cpp b/test/dbus_passive_unittest.cpp
index 7b82c74..d4e9e98 100644
--- a/test/dbus_passive_unittest.cpp
+++ b/test/dbus_passive_unittest.cpp
@@ -2,8 +2,9 @@
#include "dbus/dbuspassive.hpp"
#include "test/dbushelper_mock.hpp"
-#include <functional>
#include <sdbusplus/test/sdbus_mock.hpp>
+
+#include <functional>
#include <string>
#include <variant>
diff --git a/test/dbushelper_mock.hpp b/test/dbushelper_mock.hpp
index 62e88f1..120c44d 100644
--- a/test/dbushelper_mock.hpp
+++ b/test/dbushelper_mock.hpp
@@ -3,6 +3,7 @@
#include "util.hpp"
#include <sdbusplus/bus.hpp>
+
#include <string>
#include <gmock/gmock.h>
diff --git a/test/helpers.hpp b/test/helpers.hpp
index b95200c..1ac21ca 100644
--- a/test/helpers.hpp
+++ b/test/helpers.hpp
@@ -2,6 +2,7 @@
#pragma once
#include <sdbusplus/test/sdbus_mock.hpp>
+
#include <string>
#include <vector>
diff --git a/test/pid_zone_unittest.cpp b/test/pid_zone_unittest.cpp
index 121f44c..8593b97 100644
--- a/test/pid_zone_unittest.cpp
+++ b/test/pid_zone_unittest.cpp
@@ -5,9 +5,10 @@
#include "test/helpers.hpp"
#include "test/sensor_mock.hpp"
+#include <sdbusplus/test/sdbus_mock.hpp>
+
#include <chrono>
#include <cstring>
-#include <sdbusplus/test/sdbus_mock.hpp>
#include <vector>
#include <gmock/gmock.h>
diff --git a/test/sensor_host_unittest.cpp b/test/sensor_host_unittest.cpp
index 14c09f0..8bb9cc7 100644
--- a/test/sensor_host_unittest.cpp
+++ b/test/sensor_host_unittest.cpp
@@ -1,9 +1,10 @@
#include "sensors/host.hpp"
#include "test/helpers.hpp"
+#include <sdbusplus/test/sdbus_mock.hpp>
+
#include <chrono>
#include <memory>
-#include <sdbusplus/test/sdbus_mock.hpp>
#include <string>
#include <vector>
diff --git a/test/sensor_mock.hpp b/test/sensor_mock.hpp
index 2cc8d28..b067c7c 100644
--- a/test/sensor_mock.hpp
+++ b/test/sensor_mock.hpp
@@ -11,8 +11,7 @@
virtual ~SensorMock() = default;
SensorMock(const std::string& name, int64_t timeout) : Sensor(name, timeout)
- {
- }
+ {}
MOCK_METHOD0(read, ReadReturn());
MOCK_METHOD1(write, void(double));
diff --git a/test/writeinterface_mock.hpp b/test/writeinterface_mock.hpp
index 6e5b350..d25e332 100644
--- a/test/writeinterface_mock.hpp
+++ b/test/writeinterface_mock.hpp
@@ -10,8 +10,7 @@
virtual ~WriteInterfaceMock() = default;
WriteInterfaceMock(int64_t min, int64_t max) : WriteInterface(min, max)
- {
- }
+ {}
MOCK_METHOD1(write, void(double));
};
diff --git a/util.hpp b/util.hpp
index 5d9ab0d..4a2c2c3 100644
--- a/util.hpp
+++ b/util.hpp
@@ -2,9 +2,10 @@
#include "pid/ec/pid.hpp"
-#include <limits>
#include <phosphor-logging/log.hpp>
#include <sdbusplus/bus.hpp>
+
+#include <limits>
#include <string>
/* This program assumes sensors use the Sensor.Value interface