This is an automated email from the ASF dual-hosted git repository. martinzink pushed a commit to branch beke_2 in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit c2fe96e0bebaefc45f55ad0db4a89d2a33ea41af Author: Martin Zink <[email protected]> AuthorDate: Mon Jun 29 14:08:42 2026 +0200 fix linter issues with .clang-format update and RemoteProcessGroupPort.h reformat --- .clang-format | 2 +- libminifi/include/RemoteProcessGroupPort.h | 75 ++++++++++++++---------------- minifi-api/include/minifi-api.h | 6 +-- 3 files changed, 39 insertions(+), 44 deletions(-) diff --git a/.clang-format b/.clang-format index 0b88b74cf..abf8e379b 100644 --- a/.clang-format +++ b/.clang-format @@ -8,7 +8,7 @@ AllowAllConstructorInitializersOnNextLine: false AllowShortBlocksOnASingleLine: Empty AllowShortCaseLabelsOnASingleLine: false AllowShortEnumsOnASingleLine: false -AllowShortFunctionsOnASingleLine: Inline +AllowShortFunctionsOnASingleLine: None AllowShortIfStatementsOnASingleLine: WithoutElse AllowShortLambdasOnASingleLine: All AllowShortLoopsOnASingleLine: false diff --git a/libminifi/include/RemoteProcessGroupPort.h b/libminifi/include/RemoteProcessGroupPort.h index 62448ad94..b1da2d90d 100644 --- a/libminifi/include/RemoteProcessGroupPort.h +++ b/libminifi/include/RemoteProcessGroupPort.h @@ -19,25 +19,25 @@ */ #pragma once +#include <memory> +#include <mutex> +#include <stack> #include <string> #include <utility> #include <vector> -#include <mutex> -#include <memory> -#include <stack> -#include "http/BaseHTTPClient.h" #include "concurrentqueue.h" -#include "core/ProcessorImpl.h" +#include "core/ClassLoader.h" #include "core/ProcessSession.h" -#include "minifi-cpp/core/PropertyDefinition.h" +#include "core/ProcessorImpl.h" #include "core/PropertyDefinitionBuilder.h" -#include "minifi-cpp/core/RelationshipDefinition.h" -#include "sitetosite/SiteToSiteClient.h" -#include "minifi-cpp/controllers/SSLContextServiceInterface.h" #include "core/logging/LoggerFactory.h" +#include "http/BaseHTTPClient.h" +#include "minifi-cpp/controllers/SSLContextServiceInterface.h" +#include "minifi-cpp/core/PropertyDefinition.h" +#include "minifi-cpp/core/RelationshipDefinition.h" #include "minifi-cpp/utils/Export.h" -#include "core/ClassLoader.h" +#include "sitetosite/SiteToSiteClient.h" namespace org::apache::nifi::minifi { @@ -49,8 +49,11 @@ struct RPG { class RemoteProcessGroupPort : public core::ProcessorImpl { public: - RemoteProcessGroupPort(std::string_view name, std::string url, std::shared_ptr<Configure> configure, const utils::Identifier &uuid, sitetosite::TransferDirection direction, std::shared_ptr<core::logging::Logger> logger = nullptr) - : core::ProcessorImpl({.uuid = uuid, .name = std::string{name}, .logger = logger ? logger : core::logging::LoggerFactory<RemoteProcessGroupPort>::getLogger(uuid)}), + RemoteProcessGroupPort(std::string_view name, std::string url, std::shared_ptr<Configure> configure, const utils::Identifier& uuid, + sitetosite::TransferDirection direction, std::shared_ptr<core::logging::Logger> logger = nullptr) + : core::ProcessorImpl({.uuid = uuid, + .name = std::string{name}, + .logger = logger ? logger : core::logging::LoggerFactory<RemoteProcessGroupPort>::getLogger(uuid)}), configure_(std::move(configure)), direction_(direction), transmitting_(false), @@ -62,32 +65,24 @@ class RemoteProcessGroupPort : public core::ProcessorImpl { } virtual ~RemoteProcessGroupPort() = default; - MINIFIAPI static constexpr auto hostName = core::PropertyDefinitionBuilder<>::createProperty("Host Name") - .withDescription("Remote Host Name.") - .build(); - MINIFIAPI static constexpr auto SSLContext = core::PropertyDefinitionBuilder<>::createProperty("SSL Context Service") - .withDescription("The SSL Context Service used to provide client certificate information for TLS/SSL (https) connections.") - .build(); - MINIFIAPI static constexpr auto port = core::PropertyDefinitionBuilder<>::createProperty("Port") - .withDescription("Remote Port") - .build(); - MINIFIAPI static constexpr auto portUUID = core::PropertyDefinitionBuilder<>::createProperty("Port UUID") - .withDescription("Specifies remote NiFi Port UUID.") - .build(); - MINIFIAPI static constexpr auto idleTimeout = core::PropertyDefinitionBuilder<>::createProperty("Idle Timeout") - .withDescription("Max idle time for remote service") - .isRequired(true) - .withValidator(core::StandardPropertyValidators::TIME_PERIOD_VALIDATOR) - .withDefaultValue("15 s") - .build(); - - MINIFIAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ - hostName, - SSLContext, - port, - portUUID, - idleTimeout - }); + MINIFIAPI static constexpr auto hostName = + core::PropertyDefinitionBuilder<>::createProperty("Host Name").withDescription("Remote Host Name.").build(); + MINIFIAPI static constexpr auto SSLContext = + core::PropertyDefinitionBuilder<>::createProperty("SSL Context Service") + .withDescription("The SSL Context Service used to provide client certificate information for TLS/SSL (https) connections.") + .build(); + MINIFIAPI static constexpr auto port = core::PropertyDefinitionBuilder<>::createProperty("Port").withDescription("Remote Port").build(); + MINIFIAPI static constexpr auto portUUID = + core::PropertyDefinitionBuilder<>::createProperty("Port UUID").withDescription("Specifies remote NiFi Port UUID.").build(); + MINIFIAPI static constexpr auto idleTimeout = + core::PropertyDefinitionBuilder<>::createProperty("Idle Timeout") + .withDescription("Max idle time for remote service") + .isRequired(true) + .withValidator(core::StandardPropertyValidators::TIME_PERIOD_VALIDATOR) + .withDefaultValue("15 s") + .build(); + + MINIFIAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({hostName, SSLContext, port, portUUID, idleTimeout}); MINIFIAPI static constexpr auto DefaultRelationship = core::RelationshipDefinition{"undefined", ""}; MINIFIAPI static constexpr auto Relationships = std::array{DefaultRelationship}; @@ -115,7 +110,7 @@ class RemoteProcessGroupPort : public core::ProcessorImpl { transmitting_ = val; } - void setInterface(const std::string &ifc) { + void setInterface(const std::string& ifc) { local_network_interface_ = ifc; } @@ -125,7 +120,7 @@ class RemoteProcessGroupPort : public core::ProcessorImpl { return nifi_instances_; } - void setHTTPProxy(const http::HTTPProxy &proxy) { + void setHTTPProxy(const http::HTTPProxy& proxy) { proxy_ = proxy; } diff --git a/minifi-api/include/minifi-api.h b/minifi-api/include/minifi-api.h index b713b0e91..29e95cd12 100644 --- a/minifi-api/include/minifi-api.h +++ b/minifi-api/include/minifi-api.h @@ -15,8 +15,8 @@ * limitations under the License. */ -#ifndef MINIFI_API_INCLUDE_MINIFI_C_MINIFI_API_H_ -#define MINIFI_API_INCLUDE_MINIFI_C_MINIFI_API_H_ +#ifndef MINIFI_API_INCLUDE_MINIFI_API_H_ +#define MINIFI_API_INCLUDE_MINIFI_API_H_ #ifdef __cplusplus extern "C" { @@ -310,4 +310,4 @@ enum minifi_status minifi_process_context_get_proxy_data_from_property(struct mi } // extern "C" #endif // __cplusplus -#endif // MINIFI_API_INCLUDE_MINIFI_C_MINIFI_API_H_ +#endif // MINIFI_API_INCLUDE_MINIFI_API_H_
