Skip to content

Commit

Permalink
MINIFICPP-1203 - Resolve include order linter recommendations
Browse files Browse the repository at this point in the history
Tool used:
https://github.com/TheOstrichIO/cpplint/tree/nitpick-sort-includes/cpplint

Script used:
make linter |& egrep -v '^Done processing|^Ignoring' | grep "build/include_order" | tr ":" " " | cut -d" " -f1 | sort -rn -k1 -k2 | uniq | xargs python nitpick.py style
  • Loading branch information
hunyadi-dev committed May 20, 2020
1 parent 5f612f9 commit 1789ea5
Show file tree
Hide file tree
Showing 38 changed files with 305 additions and 294 deletions.
28 changes: 15 additions & 13 deletions extensions/standard-processors/processors/ExecuteProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,30 @@
#ifndef EXTENSIONS_STANDARD_PROCESSORS_PROCESSORS_EXECUTEPROCESS_H_
#define EXTENSIONS_STANDARD_PROCESSORS_PROCESSORS_EXECUTEPROCESS_H_

#include <memory>

#include <stdio.h>
#include <string>
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <sys/types.h>

#include <chrono>
#include <thread>
#include <iostream>
#include <sys/types.h>
#include <signal.h>
#include <memory>
#include <string>
#include <thread>

#ifndef WIN32
#include <sys/wait.h>
#include <sys/types.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>

#endif
#include "io/BaseStream.h"
#include "FlowFileRecord.h"
#include "core/Core.h"
#include "core/logging/LoggerConfiguration.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/Core.h"
#include "core/Resource.h"
#include "core/logging/LoggerConfiguration.h"
#include "FlowFileRecord.h"
#include "io/BaseStream.h"

namespace org {
namespace apache {
Expand Down
6 changes: 2 additions & 4 deletions extensions/standard-processors/processors/ExtractText.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@
#define EXTENSIONS_STANDARD_PROCESSORS_PROCESSORS_EXTRACTTEXT_H_

#include <memory>

#include <string>
#include <vector>

#include "FlowFileRecord.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/Resource.h"

#include <vector>
#include "FlowFileRecord.h"

namespace org {
namespace apache {
Expand Down
12 changes: 6 additions & 6 deletions extensions/standard-processors/processors/HashContent.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@

#ifdef OPENSSL_SUPPORT

#include <openssl/md5.h>
#include <openssl/sha.h>
#include <stdint.h>

#include <iomanip>
#include <map>
#include <memory>
#include <string>
#include <sstream>
#include <string>
#include <utility>
#include <stdint.h>

#include <openssl/md5.h>
#include <openssl/sha.h>

#include "FlowFileRecord.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/Resource.h"
#include "FlowFileRecord.h"
#include "io/BaseStream.h"
#include "utils/StringUtils.h"

Expand Down
22 changes: 12 additions & 10 deletions extensions/standard-processors/processors/ListenSyslog.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,37 @@
#ifndef EXTENSIONS_STANDARD_PROCESSORS_PROCESSORS_LISTENSYSLOG_H_
#define EXTENSIONS_STANDARD_PROCESSORS_PROCESSORS_LISTENSYSLOG_H_

#include <memory>
#include <stdio.h>
#include <sys/types.h>

#include <memory>
#include <queue>

#include <string>

#include <vector>

#include <stdio.h>
#include <sys/types.h>
#ifndef WIN32
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <sys/time.h>

#else
#include <WinSock2.h>

#endif
#include <errno.h>
#include <sys/types.h>

#include <chrono>
#include <thread>
#include "FlowFileRecord.h"

#include "core/Core.h"
#include "core/logging/LoggerConfiguration.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/Core.h"
#include "core/Resource.h"
#include "core/logging/LoggerConfiguration.h"
#include "FlowFileRecord.h"

#ifndef WIN32

Expand Down
8 changes: 3 additions & 5 deletions libminifi/include/CronDrivenSchedulingAgent.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,18 @@
#ifndef LIBMINIFI_INCLUDE_CRONDRIVENSCHEDULINGAGENT_H_
#define LIBMINIFI_INCLUDE_CRONDRIVENSCHEDULINGAGENT_H_

#include <chrono>
#include <map>

#include <memory>

#include <string>

#include "core/logging/Logger.h"
#include "core/Processor.h"
#include "core/ProcessContext.h"
#include "core/Processor.h"
#include "core/ProcessSessionFactory.h"
#include "Cron.h"
#include "ThreadedSchedulingAgent.h"
#include <chrono>

#include "Cron.h"
namespace org {
namespace apache {
namespace nifi {
Expand Down
11 changes: 6 additions & 5 deletions libminifi/include/Exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
#ifndef LIBMINIFI_INCLUDE_EXCEPTION_H_
#define LIBMINIFI_INCLUDE_EXCEPTION_H_

#include <string>
#include <errno.h>
#include <string.h>

#include "utils/StringUtils.h"
#include <sstream>
#include <exception>
#include <sstream>
#include <stdexcept>
#include <errno.h>
#include <string.h>
#include <string>

#include "utils/StringUtils.h"

namespace org {
namespace apache {
Expand Down
13 changes: 6 additions & 7 deletions libminifi/include/FlowControlProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,20 @@
#ifndef LIBMINIFI_INCLUDE_FLOWCONTROLPROTOCOL_H_
#define LIBMINIFI_INCLUDE_FLOWCONTROLPROTOCOL_H_

#include <memory>

#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/types.h>

#include <fcntl.h>
#include <string>
#include <errno.h>
#include <chrono>
#include <thread>
#include <cinttypes>
#include <memory>
#include <string>
#include <thread>

#include "core/logging/LoggerConfiguration.h"
#include "core/Property.h"
#include "properties/Configure.h"
#include "core/logging/LoggerConfiguration.h"

namespace org {
namespace apache {
Expand Down
48 changes: 24 additions & 24 deletions libminifi/include/FlowController.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,41 +20,41 @@
#ifndef LIBMINIFI_INCLUDE_FLOWCONTROLLER_H_
#define LIBMINIFI_INCLUDE_FLOWCONTROLLER_H_

#include <memory>

#include <string>

#include <utility>

#include <stdio.h>
#include <vector>
#include <queue>

#include <algorithm>
#include <atomic>
#include <map>
#include <memory>
#include <mutex>
#include <atomic>
#include <algorithm>
#include <queue>
#include <set>
#include "properties/Configure.h"
#include "core/Relationship.h"
#include "FlowFileRecord.h"
#include <string>
#include <utility>
#include <vector>

#include "Connection.h"
#include "core/Processor.h"
#include "core/controller/ControllerServiceNode.h"
#include "core/controller/ControllerServiceProvider.h"
#include "core/FlowConfiguration.h"
#include "core/logging/Logger.h"
#include "core/ProcessContext.h"
#include "core/ProcessSession.h"
#include "core/ProcessGroup.h"
#include "core/FlowConfiguration.h"
#include "core/controller/ControllerServiceNode.h"
#include "core/controller/ControllerServiceProvider.h"
#include "TimerDrivenSchedulingAgent.h"
#include "EventDrivenSchedulingAgent.h"
#include "CronDrivenSchedulingAgent.h"
#include "FlowControlProtocol.h"
#include "core/Processor.h"
#include "core/ProcessSession.h"
#include "core/Property.h"
#include "core/Relationship.h"
#include "core/state/nodes/FlowInformation.h"
#include "core/state/nodes/MetricsBase.h"
#include "utils/Id.h"
#include "core/state/StateManager.h"
#include "core/state/nodes/FlowInformation.h"
#include "CronDrivenSchedulingAgent.h"
#include "EventDrivenSchedulingAgent.h"
#include "FlowControlProtocol.h"
#include "FlowFileRecord.h"
#include "properties/Configure.h"
#include "TimerDrivenSchedulingAgent.h"
#include "utils/Id.h"

namespace org {
namespace apache {
namespace nifi {
Expand Down
9 changes: 5 additions & 4 deletions libminifi/include/agent/agent_docs.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
#ifndef LIBMINIFI_INCLUDE_AGENT_AGENT_DOCS_H_
#define LIBMINIFI_INCLUDE_AGENT_AGENT_DOCS_H_

#include <map>

#include <utility>
#include <string>
#include <stdlib.h>
#include <utils/StringUtils.h>

#include <map>
#include <string>
#include <utility>

namespace org {
namespace apache {
namespace nifi {
Expand Down
3 changes: 1 addition & 2 deletions libminifi/include/c2/PayloadParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
#define LIBMINIFI_INCLUDE_C2_PAYLOADPARSER_H_

#include <memory>

#include <string>
#include <vector>

#include "C2Payload.h"
#include "core/state/Value.h"
#include <string>

namespace org {
namespace apache {
Expand Down
19 changes: 8 additions & 11 deletions libminifi/include/c2/protocols/RESTProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,27 @@
#define LIBMINIFI_INCLUDE_C2_PROTOCOLS_RESTPROTOCOL_H_

#include <map>

#include <vector>

#include <stdexcept>
#include <vector>

#ifdef RAPIDJSON_ASSERT
#undef RAPIDJSON_ASSERT
#endif
#define RAPIDJSON_ASSERT(x) if(!(x)) throw std::logic_error("rapidjson exception"); //NOLINT

#include "rapidjson/document.h"
#include "rapidjson/writer.h"
#include "rapidjson/stringbuffer.h"
#include "rapidjson/prettywriter.h"

#include <string>
#include <mutex>
#include <string>

#include "utils/ByteArrayCallback.h"
#include "c2/C2Protocol.h"
#include "c2/HeartBeatReporter.h"
#include "controllers/SSLContextService.h"
#include "utils/HTTPClient.h"
#include "Exception.h"
#include "rapidjson/document.h"
#include "rapidjson/prettywriter.h"
#include "rapidjson/stringbuffer.h"
#include "rapidjson/writer.h"
#include "utils/ByteArrayCallback.h"
#include "utils/HTTPClient.h"

namespace org {
namespace apache {
Expand Down
4 changes: 3 additions & 1 deletion libminifi/include/core/Core.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
#include <properties/Configure.h>

#include <cstdlib>
#include <iostream>
#include <memory>
#include <string>
#include <properties/Configure.h>

#ifdef WIN32
#pragma comment(lib, "shlwapi.lib")
Expand Down Expand Up @@ -62,6 +63,7 @@
// can't include cxxabi
#else
#include <cxxabi.h>

#endif

#include "utils/Id.h"
Expand Down

0 comments on commit 1789ea5

Please sign in to comment.