From e5c650ea45ac8053cadcf71b07b4dedad4ceec7f Mon Sep 17 00:00:00 2001 From: Charles Tytler Date: Fri, 16 Jan 2026 16:21:30 -0800 Subject: [PATCH 1/2] Update includes so all Vendored code is included with <> --- Sources/backend-cpp/ElgatoSD/EPLJSONUtils.h | 2 +- Sources/backend-cpp/ElgatoSD/ESDBasePlugin.h | 2 +- Sources/backend-cpp/ElgatoSD/test/CMakeLists.txt | 2 +- .../Protocols/test/DcsBiosProtocolTest.cpp | 2 +- .../Protocols/test/DcsBiosStreamParserTest.cpp | 2 +- .../Protocols/test/DcsExportScriptProtocolTest.cpp | 2 +- .../backend-cpp/SimulatorInterface/SimulatorInterface.h | 2 +- .../SimulatorInterface/test/SimConnectionManagerTest.cpp | 2 +- .../SimulatorInterface/test/SimulatorInterfaceTest.cpp | 8 ++++---- .../StreamdeckContext/BackwardsCompatibilityHandler.h | 2 +- .../ExportMonitors/test/ImageStateMonitorTest.cpp | 2 +- .../ExportMonitors/test/IncrementMonitorTest.cpp | 2 +- .../ExportMonitors/test/TitleMonitorTest.cpp | 2 +- .../SendActions/test/IncrementActionTest.cpp | 4 ++-- .../SendActions/test/MomentaryActionTest.cpp | 4 ++-- .../SendActions/test/SendActionFactoryTest.cpp | 2 +- .../SendActions/test/SwitchActionTest.cpp | 4 ++-- .../test/BackwardsCompatibilityHandlerTest.cpp | 2 +- .../StreamdeckContext/test/StreamdeckContextTest.cpp | 4 ++-- .../StreamdeckInterface/StreamdeckInterface.cpp | 2 +- Sources/backend-cpp/Utilities/JsonReader.h | 2 +- Sources/backend-cpp/Utilities/LuaReader.cpp | 2 +- Sources/backend-cpp/Utilities/LuaReader.h | 4 ++-- Sources/backend-cpp/Utilities/test/DecimalTest.cpp | 2 +- Sources/backend-cpp/Utilities/test/JsonReaderTest.cpp | 2 +- Sources/backend-cpp/Utilities/test/LuaReaderTest.cpp | 6 +++--- .../backend-cpp/Utilities/test/StringUtilitiesTest.cpp | 4 ++-- Sources/backend-cpp/Utilities/test/UdpSocketTest.cpp | 2 +- 28 files changed, 39 insertions(+), 39 deletions(-) diff --git a/Sources/backend-cpp/ElgatoSD/EPLJSONUtils.h b/Sources/backend-cpp/ElgatoSD/EPLJSONUtils.h index aad98bf4..b6ec0368 100644 --- a/Sources/backend-cpp/ElgatoSD/EPLJSONUtils.h +++ b/Sources/backend-cpp/ElgatoSD/EPLJSONUtils.h @@ -17,7 +17,7 @@ // Includes //------------------------------------------------------------------------------ -#include "nlohmann/json.hpp" +#include using json = nlohmann::json; class EPLJSONUtils diff --git a/Sources/backend-cpp/ElgatoSD/ESDBasePlugin.h b/Sources/backend-cpp/ElgatoSD/ESDBasePlugin.h index 0454bce6..c9f17f7e 100644 --- a/Sources/backend-cpp/ElgatoSD/ESDBasePlugin.h +++ b/Sources/backend-cpp/ElgatoSD/ESDBasePlugin.h @@ -12,7 +12,7 @@ #pragma once -#include "nlohmann/json.hpp" +#include using json = nlohmann::json; class ESDConnectionManager; diff --git a/Sources/backend-cpp/ElgatoSD/test/CMakeLists.txt b/Sources/backend-cpp/ElgatoSD/test/CMakeLists.txt index f0cbb509..91631efe 100644 --- a/Sources/backend-cpp/ElgatoSD/test/CMakeLists.txt +++ b/Sources/backend-cpp/ElgatoSD/test/CMakeLists.txt @@ -4,5 +4,5 @@ target_sources(MockESDConnectionManager INTERFACE MockESDConnectionManager.h) target_include_directories( MockESDConnectionManager - INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} + INTERFACE ${CMAKE_SOURCE_DIR} ) diff --git a/Sources/backend-cpp/SimulatorInterface/Protocols/test/DcsBiosProtocolTest.cpp b/Sources/backend-cpp/SimulatorInterface/Protocols/test/DcsBiosProtocolTest.cpp index 779c99c0..51a801c9 100644 --- a/Sources/backend-cpp/SimulatorInterface/Protocols/test/DcsBiosProtocolTest.cpp +++ b/Sources/backend-cpp/SimulatorInterface/Protocols/test/DcsBiosProtocolTest.cpp @@ -1,6 +1,6 @@ // Copyright 2021 Charles Tytler -#include "gtest/gtest.h" +#include #include "SimulatorInterface/Protocols/DcsBiosProtocol.h" diff --git a/Sources/backend-cpp/SimulatorInterface/Protocols/test/DcsBiosStreamParserTest.cpp b/Sources/backend-cpp/SimulatorInterface/Protocols/test/DcsBiosStreamParserTest.cpp index b4ae3cc0..03678736 100644 --- a/Sources/backend-cpp/SimulatorInterface/Protocols/test/DcsBiosStreamParserTest.cpp +++ b/Sources/backend-cpp/SimulatorInterface/Protocols/test/DcsBiosStreamParserTest.cpp @@ -1,6 +1,6 @@ // Copyright 2021 Charles Tytler -#include "gtest/gtest.h" +#include #include "SimulatorInterface/Protocols/DcsBiosStreamParser.h" diff --git a/Sources/backend-cpp/SimulatorInterface/Protocols/test/DcsExportScriptProtocolTest.cpp b/Sources/backend-cpp/SimulatorInterface/Protocols/test/DcsExportScriptProtocolTest.cpp index 0076a98e..31d1cd60 100644 --- a/Sources/backend-cpp/SimulatorInterface/Protocols/test/DcsExportScriptProtocolTest.cpp +++ b/Sources/backend-cpp/SimulatorInterface/Protocols/test/DcsExportScriptProtocolTest.cpp @@ -1,6 +1,6 @@ // Copyright 2020 Charles Tytler -#include "gtest/gtest.h" +#include #include "SimulatorInterface/Protocols/DcsExportScriptProtocol.h" diff --git a/Sources/backend-cpp/SimulatorInterface/SimulatorInterface.h b/Sources/backend-cpp/SimulatorInterface/SimulatorInterface.h index 79b9e4a2..7d340632 100644 --- a/Sources/backend-cpp/SimulatorInterface/SimulatorInterface.h +++ b/Sources/backend-cpp/SimulatorInterface/SimulatorInterface.h @@ -4,7 +4,7 @@ #include "Utilities/Decimal.h" #include "Utilities/UdpSocket.h" -#include "nlohmann/json.hpp" +#include using json = nlohmann::json; #include diff --git a/Sources/backend-cpp/SimulatorInterface/test/SimConnectionManagerTest.cpp b/Sources/backend-cpp/SimulatorInterface/test/SimConnectionManagerTest.cpp index 2042eac4..1d51f05e 100644 --- a/Sources/backend-cpp/SimulatorInterface/test/SimConnectionManagerTest.cpp +++ b/Sources/backend-cpp/SimulatorInterface/test/SimConnectionManagerTest.cpp @@ -1,6 +1,6 @@ // Copyright 2021 Charles Tytler -#include "gtest/gtest.h" +#include #include "SimulatorInterface/SimConnectionManager.h" diff --git a/Sources/backend-cpp/SimulatorInterface/test/SimulatorInterfaceTest.cpp b/Sources/backend-cpp/SimulatorInterface/test/SimulatorInterfaceTest.cpp index 13a70f2a..52ce10bc 100644 --- a/Sources/backend-cpp/SimulatorInterface/test/SimulatorInterfaceTest.cpp +++ b/Sources/backend-cpp/SimulatorInterface/test/SimulatorInterfaceTest.cpp @@ -1,6 +1,6 @@ // Copyright 2020 Charles Tytler -#include "gtest/gtest.h" +#include #include "SimulatorInterface/SimulatorInterface.h" @@ -11,9 +11,9 @@ class SimulatorInterfaceDerivedClass : public SimulatorInterface { using SimulatorInterface::SimulatorInterface; // Implement pure virtual functions to allow testing of common functions. - void update_simulator_state(){}; - void send_command(const std::string &address, const std::string &value){}; - void send_reset_command(){}; + void update_simulator_state() {}; + void send_command(const std::string &address, const std::string &value) {}; + void send_reset_command() {}; std::optional get_string_at_addr(const SimulatorAddress &address) const { return std::nullopt; } std::optional get_value_at_addr(const SimulatorAddress &address) const { return std::nullopt; } json get_current_state_as_json() const { return json{}; }; diff --git a/Sources/backend-cpp/StreamdeckContext/BackwardsCompatibilityHandler.h b/Sources/backend-cpp/StreamdeckContext/BackwardsCompatibilityHandler.h index 5f2e21a6..ca1707c4 100644 --- a/Sources/backend-cpp/StreamdeckContext/BackwardsCompatibilityHandler.h +++ b/Sources/backend-cpp/StreamdeckContext/BackwardsCompatibilityHandler.h @@ -1,6 +1,6 @@ // Copyright 2022 Charles Tytler -#include "nlohmann/json.hpp" +#include using json = nlohmann::json; json backwardsCompatibilityHandler(const json &prevVersionPayload); diff --git a/Sources/backend-cpp/StreamdeckContext/ExportMonitors/test/ImageStateMonitorTest.cpp b/Sources/backend-cpp/StreamdeckContext/ExportMonitors/test/ImageStateMonitorTest.cpp index 8bbc1d18..5b8b94c4 100644 --- a/Sources/backend-cpp/StreamdeckContext/ExportMonitors/test/ImageStateMonitorTest.cpp +++ b/Sources/backend-cpp/StreamdeckContext/ExportMonitors/test/ImageStateMonitorTest.cpp @@ -1,6 +1,6 @@ // Copyright 2021 Charles Tytler -#include "gtest/gtest.h" +#include #include "SimulatorInterface/SimConnectionManager.h" #include "StreamdeckContext/ExportMonitors/ImageStateMonitor.h" diff --git a/Sources/backend-cpp/StreamdeckContext/ExportMonitors/test/IncrementMonitorTest.cpp b/Sources/backend-cpp/StreamdeckContext/ExportMonitors/test/IncrementMonitorTest.cpp index 147c5dde..63f4af98 100644 --- a/Sources/backend-cpp/StreamdeckContext/ExportMonitors/test/IncrementMonitorTest.cpp +++ b/Sources/backend-cpp/StreamdeckContext/ExportMonitors/test/IncrementMonitorTest.cpp @@ -1,6 +1,6 @@ // Copyright 2021 Charles Tytler -#include "gtest/gtest.h" +#include #include "SimulatorInterface/SimConnectionManager.h" #include "StreamdeckContext/ExportMonitors/IncrementMonitor.h" diff --git a/Sources/backend-cpp/StreamdeckContext/ExportMonitors/test/TitleMonitorTest.cpp b/Sources/backend-cpp/StreamdeckContext/ExportMonitors/test/TitleMonitorTest.cpp index 8df47232..644a6e86 100644 --- a/Sources/backend-cpp/StreamdeckContext/ExportMonitors/test/TitleMonitorTest.cpp +++ b/Sources/backend-cpp/StreamdeckContext/ExportMonitors/test/TitleMonitorTest.cpp @@ -1,6 +1,6 @@ // Copyright 2021 Charles Tytler -#include "gtest/gtest.h" +#include #include "SimulatorInterface/SimConnectionManager.h" #include "StreamdeckContext/ExportMonitors/TitleMonitor.h" diff --git a/Sources/backend-cpp/StreamdeckContext/SendActions/test/IncrementActionTest.cpp b/Sources/backend-cpp/StreamdeckContext/SendActions/test/IncrementActionTest.cpp index 000ac419..ff4adf6b 100644 --- a/Sources/backend-cpp/StreamdeckContext/SendActions/test/IncrementActionTest.cpp +++ b/Sources/backend-cpp/StreamdeckContext/SendActions/test/IncrementActionTest.cpp @@ -1,11 +1,11 @@ // Copyright 2021 Charles Tytler -#include "gtest/gtest.h" +#include #include "SimulatorInterface/SimConnectionManager.h" #include "StreamdeckContext/SendActions/IncrementAction.h" -#include "MockESDConnectionManager.h" +#include "ElgatoSD/test/MockESDConnectionManager.h" namespace test { diff --git a/Sources/backend-cpp/StreamdeckContext/SendActions/test/MomentaryActionTest.cpp b/Sources/backend-cpp/StreamdeckContext/SendActions/test/MomentaryActionTest.cpp index 91087488..84a546fc 100644 --- a/Sources/backend-cpp/StreamdeckContext/SendActions/test/MomentaryActionTest.cpp +++ b/Sources/backend-cpp/StreamdeckContext/SendActions/test/MomentaryActionTest.cpp @@ -1,11 +1,11 @@ // Copyright 2021 Charles Tytler -#include "gtest/gtest.h" +#include #include "SimulatorInterface/SimConnectionManager.h" #include "StreamdeckContext/SendActions/MomentaryAction.h" -#include "MockESDConnectionManager.h" +#include "ElgatoSD/test/MockESDConnectionManager.h" namespace test { diff --git a/Sources/backend-cpp/StreamdeckContext/SendActions/test/SendActionFactoryTest.cpp b/Sources/backend-cpp/StreamdeckContext/SendActions/test/SendActionFactoryTest.cpp index 8734ce06..ef6ec931 100644 --- a/Sources/backend-cpp/StreamdeckContext/SendActions/test/SendActionFactoryTest.cpp +++ b/Sources/backend-cpp/StreamdeckContext/SendActions/test/SendActionFactoryTest.cpp @@ -1,6 +1,6 @@ // Copyright 2021 Charles Tytler -#include "gtest/gtest.h" +#include #include "StreamdeckContext/SendActions/SendActionFactory.h" diff --git a/Sources/backend-cpp/StreamdeckContext/SendActions/test/SwitchActionTest.cpp b/Sources/backend-cpp/StreamdeckContext/SendActions/test/SwitchActionTest.cpp index 01f03889..a5f18933 100644 --- a/Sources/backend-cpp/StreamdeckContext/SendActions/test/SwitchActionTest.cpp +++ b/Sources/backend-cpp/StreamdeckContext/SendActions/test/SwitchActionTest.cpp @@ -1,10 +1,10 @@ // Copyright 2021 Charles Tytler -#include "gtest/gtest.h" +#include #include "StreamdeckContext/SendActions/SwitchAction.h" -#include "MockESDConnectionManager.h" +#include "ElgatoSD/test/MockESDConnectionManager.h" #include "SimulatorInterface/SimConnectionManager.h" namespace test { diff --git a/Sources/backend-cpp/StreamdeckContext/test/BackwardsCompatibilityHandlerTest.cpp b/Sources/backend-cpp/StreamdeckContext/test/BackwardsCompatibilityHandlerTest.cpp index 55899062..758f6bfe 100644 --- a/Sources/backend-cpp/StreamdeckContext/test/BackwardsCompatibilityHandlerTest.cpp +++ b/Sources/backend-cpp/StreamdeckContext/test/BackwardsCompatibilityHandlerTest.cpp @@ -1,6 +1,6 @@ // Copyright 2022 Charles Tytler -#include "gtest/gtest.h" +#include #include "StreamdeckContext/BackwardsCompatibilityHandler.h" diff --git a/Sources/backend-cpp/StreamdeckContext/test/StreamdeckContextTest.cpp b/Sources/backend-cpp/StreamdeckContext/test/StreamdeckContextTest.cpp index 6373c198..9773fb83 100644 --- a/Sources/backend-cpp/StreamdeckContext/test/StreamdeckContextTest.cpp +++ b/Sources/backend-cpp/StreamdeckContext/test/StreamdeckContextTest.cpp @@ -1,9 +1,9 @@ // Copyright 2020 Charles Tytler -#include "gtest/gtest.h" +#include #include -#include "MockESDConnectionManager.h" // Must be called before other includes +#include "ElgatoSD/test/MockESDConnectionManager.h" // Must be called before other includes #include "SimulatorInterface/SimConnectionManager.h" #include "StreamdeckContext/StreamdeckContext.h" diff --git a/Sources/backend-cpp/StreamdeckInterface/StreamdeckInterface.cpp b/Sources/backend-cpp/StreamdeckInterface/StreamdeckInterface.cpp index a144de6a..6b57c732 100644 --- a/Sources/backend-cpp/StreamdeckInterface/StreamdeckInterface.cpp +++ b/Sources/backend-cpp/StreamdeckInterface/StreamdeckInterface.cpp @@ -21,7 +21,7 @@ #include "Utilities/JsonReader.h" #include "Utilities/LuaReader.h" -#include "nlohmann/json.hpp" +#include using json = nlohmann::json; class CallBackTimer diff --git a/Sources/backend-cpp/Utilities/JsonReader.h b/Sources/backend-cpp/Utilities/JsonReader.h index e6404e3e..b31628ee 100644 --- a/Sources/backend-cpp/Utilities/JsonReader.h +++ b/Sources/backend-cpp/Utilities/JsonReader.h @@ -5,7 +5,7 @@ #include #include -#include "nlohmann\json.hpp" +#include using json = nlohmann::json; std::optional get_module_list(const std::string &path); diff --git a/Sources/backend-cpp/Utilities/LuaReader.cpp b/Sources/backend-cpp/Utilities/LuaReader.cpp index 2a4af4e5..99005f70 100644 --- a/Sources/backend-cpp/Utilities/LuaReader.cpp +++ b/Sources/backend-cpp/Utilities/LuaReader.cpp @@ -2,7 +2,7 @@ #include "LuaReader.h" -#include "lua.hpp" +#include #include #include diff --git a/Sources/backend-cpp/Utilities/LuaReader.h b/Sources/backend-cpp/Utilities/LuaReader.h index a1068a8d..23781859 100644 --- a/Sources/backend-cpp/Utilities/LuaReader.h +++ b/Sources/backend-cpp/Utilities/LuaReader.h @@ -2,7 +2,7 @@ #pragma once -#include "nlohmann/json.hpp" +#include using json = nlohmann::json; @@ -25,4 +25,4 @@ json get_installed_modules(const std::string &dcs_install_path, const std::strin */ json get_clickabledata(const std::string &dcs_install_path, const std::string &module_name, - const std::string &lua_script); \ No newline at end of file + const std::string &lua_script); diff --git a/Sources/backend-cpp/Utilities/test/DecimalTest.cpp b/Sources/backend-cpp/Utilities/test/DecimalTest.cpp index 3a65d62e..27f81835 100644 --- a/Sources/backend-cpp/Utilities/test/DecimalTest.cpp +++ b/Sources/backend-cpp/Utilities/test/DecimalTest.cpp @@ -1,6 +1,6 @@ // Copyright 2020 Charles Tytler -#include "gtest/gtest.h" +#include #include "Utilities/Decimal.h" diff --git a/Sources/backend-cpp/Utilities/test/JsonReaderTest.cpp b/Sources/backend-cpp/Utilities/test/JsonReaderTest.cpp index e495502f..c92d266f 100644 --- a/Sources/backend-cpp/Utilities/test/JsonReaderTest.cpp +++ b/Sources/backend-cpp/Utilities/test/JsonReaderTest.cpp @@ -1,6 +1,6 @@ // Copyright 2021 Charles Tytler -#include "gtest/gtest.h" +#include #include "Utilities/JsonReader.h" diff --git a/Sources/backend-cpp/Utilities/test/LuaReaderTest.cpp b/Sources/backend-cpp/Utilities/test/LuaReaderTest.cpp index fd9ab445..3b397568 100644 --- a/Sources/backend-cpp/Utilities/test/LuaReaderTest.cpp +++ b/Sources/backend-cpp/Utilities/test/LuaReaderTest.cpp @@ -1,10 +1,10 @@ // Copyright 2020 Charles Tytler -#include "gtest/gtest.h" +#include #include "Utilities/LuaReader.h" -#include "nlohmann/json.hpp" +#include using json = nlohmann::json; namespace test @@ -28,4 +28,4 @@ TEST(LuaReaderTest, nonexistant_lua_file) EXPECT_EQ(0, returned_values["clickabledata_items"].size()); } -} // namespace test \ No newline at end of file +} // namespace test diff --git a/Sources/backend-cpp/Utilities/test/StringUtilitiesTest.cpp b/Sources/backend-cpp/Utilities/test/StringUtilitiesTest.cpp index 919b26da..c7d8242c 100644 --- a/Sources/backend-cpp/Utilities/test/StringUtilitiesTest.cpp +++ b/Sources/backend-cpp/Utilities/test/StringUtilitiesTest.cpp @@ -1,6 +1,6 @@ // Copyright 2020 Charles Tytler -#include "gtest/gtest.h" +#include #include "Utilities/StringUtilities.h" @@ -189,4 +189,4 @@ TEST(StringUtilitiesTest, pop_key_and_value_missing_token_delim) EXPECT_EQ("value1key2=value2", key_and_value.value().second); } -} // namespace test \ No newline at end of file +} // namespace test diff --git a/Sources/backend-cpp/Utilities/test/UdpSocketTest.cpp b/Sources/backend-cpp/Utilities/test/UdpSocketTest.cpp index fc2781c9..b07d395d 100644 --- a/Sources/backend-cpp/Utilities/test/UdpSocketTest.cpp +++ b/Sources/backend-cpp/Utilities/test/UdpSocketTest.cpp @@ -1,6 +1,6 @@ // Copyright 2020 Charles Tytler -#include "gtest/gtest.h" +#include #include "Utilities/UdpSocket.h" From 5f35c71e134e5fa0ef61120d2f7e1a9c8b0c85fc Mon Sep 17 00:00:00 2001 From: Charles Tytler Date: Mon, 19 Jan 2026 12:43:53 -0800 Subject: [PATCH 2/2] Fix lint rules mismatch --- .../SimulatorInterface/test/SimulatorInterfaceTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/backend-cpp/SimulatorInterface/test/SimulatorInterfaceTest.cpp b/Sources/backend-cpp/SimulatorInterface/test/SimulatorInterfaceTest.cpp index 52ce10bc..ecc82318 100644 --- a/Sources/backend-cpp/SimulatorInterface/test/SimulatorInterfaceTest.cpp +++ b/Sources/backend-cpp/SimulatorInterface/test/SimulatorInterfaceTest.cpp @@ -11,9 +11,9 @@ class SimulatorInterfaceDerivedClass : public SimulatorInterface { using SimulatorInterface::SimulatorInterface; // Implement pure virtual functions to allow testing of common functions. - void update_simulator_state() {}; - void send_command(const std::string &address, const std::string &value) {}; - void send_reset_command() {}; + void update_simulator_state(){}; + void send_command(const std::string &address, const std::string &value){}; + void send_reset_command(){}; std::optional get_string_at_addr(const SimulatorAddress &address) const { return std::nullopt; } std::optional get_value_at_addr(const SimulatorAddress &address) const { return std::nullopt; } json get_current_state_as_json() const { return json{}; };