Skip to content

Commit

Permalink
Merge pull request #15 from eclipse-ecal/clang-tidy-include-cleaner
Browse files Browse the repository at this point in the history
clang tidy include cleaner
  • Loading branch information
rex-schilasky authored Feb 8, 2024
2 parents fe8dae7 + 7139623 commit 19453ce
Show file tree
Hide file tree
Showing 153 changed files with 483 additions and 78 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ cmake-build-*

# Visual Studio code
*.vscode

#QtCreator
*.txt.user
3 changes: 2 additions & 1 deletion src/core/include/ecal/ecal_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@

#pragma once

#include <cstddef>
#include <ecal/ecal_log_level.h>
#include <ecal/ecal_os.h>
#include <ecal/ecal_tlayer.h>
#include <ecal/ecal_log_level.h>

#include <string>

Expand Down
1 change: 1 addition & 0 deletions src/core/include/ecal/ecal_monitoring.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include <ecal/ecal_os.h>
#include <ecal/types/monitoring.h>
#include <string>

namespace eCAL
{
Expand Down
5 changes: 3 additions & 2 deletions src/core/include/ecal/ecal_publisher.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@

#pragma once

#include <ecal/ecal_os.h>
#include <ecal/ecal_deprecate.h>
#include <cstddef>
#include <ecal/ecal_callback.h>
#include <ecal/ecal_deprecate.h>
#include <ecal/ecal_os.h>
#include <ecal/ecal_payload_writer.h>
#include <ecal/ecal_types.h>

Expand Down
5 changes: 3 additions & 2 deletions src/core/include/ecal/ecal_subscriber.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@

#pragma once

#include <ecal/ecal_os.h>
#include <ecal/ecal_deprecate.h>
#include <cstddef>
#include <ecal/ecal_callback.h>
#include <ecal/ecal_deprecate.h>
#include <ecal/ecal_os.h>
#include <ecal/ecal_types.h>

#include <memory>
Expand Down
4 changes: 2 additions & 2 deletions src/core/include/ecal/ecal_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
#include <ecal/ecal_types.h>

#include <map>
#include <unordered_map>
#include <string>
#include <tuple>
#include <unordered_map>
#include <utility>
#include <vector>


namespace eCAL
{
namespace Util
Expand Down
8 changes: 7 additions & 1 deletion src/core/include/ecal/msg/protobuf/dynamic_publisher.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@

#pragma once

#include <cassert>
#include <cstddef>
#include <memory>
#include <ostream>
#include <sstream>

#include <ecal/ecal.h>
#include <ecal/msg/publisher.h>
#include <ecal/msg/protobuf/ecal_proto_hlp.h>
#include <ecal/msg/publisher.h>
#include <stdexcept>
#include <string>

#ifdef _MSC_VER
#pragma warning(push, 0) // disable proto warnings
Expand Down
3 changes: 3 additions & 0 deletions src/core/include/ecal/msg/protobuf/dynamic_subscriber.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@
#include <ecal/msg/protobuf/ecal_proto_dyn.h>

#include <exception>
#include <functional>
#include <memory>
#include <ostream>
#include <sstream>
#include <string>

#ifdef _MSC_VER
#pragma warning(push, 0) // disable proto warnings
Expand Down
1 change: 1 addition & 0 deletions src/core/include/ecal/msg/protobuf/ecal_proto_hlp.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#pragma once

#include <algorithm>
#include <iterator>
#include <string>
#include <vector>

Expand Down
3 changes: 2 additions & 1 deletion src/core/include/ecal/msg/protobuf/publisher.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@

#pragma once

#include <cstddef>
#include <ecal/ecal_deprecate.h>
#include <ecal/msg/publisher.h>
#include <ecal/msg/protobuf/ecal_proto_hlp.h>
#include <ecal/msg/publisher.h>

// protobuf includes
#ifdef _MSC_VER
Expand Down
3 changes: 2 additions & 1 deletion src/core/include/ecal/msg/protobuf/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
#pragma once

#include <ecal/ecal_server.h>
#include <ecal/msg/protobuf/ecal_proto_dyn.h>
#include <ecal/msg/dynamic.h>
#include <ecal/msg/protobuf/ecal_proto_dyn.h>
#include <functional>

// protobuf includes
#ifdef _MSC_VER
Expand Down
3 changes: 2 additions & 1 deletion src/core/include/ecal/msg/protobuf/subscriber.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@

#pragma once

#include <ecal/msg/subscriber.h>
#include <cstddef>
#include <ecal/msg/protobuf/ecal_proto_hlp.h>
#include <ecal/msg/subscriber.h>

// protobuf includes
#ifdef _MSC_VER
Expand Down
1 change: 1 addition & 0 deletions src/core/include/ecal/msg/string/publisher.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#pragma once

#include <cstddef>
#include <ecal/ecal_deprecate.h>
#include <ecal/msg/publisher.h>

Expand Down
1 change: 1 addition & 0 deletions src/core/include/ecal/msg/string/subscriber.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#pragma once

#include <cstddef>
#include <ecal/msg/subscriber.h>

#include <string>
Expand Down
1 change: 1 addition & 0 deletions src/core/include/ecal/types/monitoring.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <map>
#include <string>
#include <vector>
#include <cstdint>

namespace eCAL
{
Expand Down
3 changes: 3 additions & 0 deletions src/core/src/config/ecal_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@
* ========================= eCAL LICENSE =================================
*/

#include <cstddef>
#include <ecal/ecal_config.h>
#include <ecal/ecal_log_level.h>
#include <string>
#include <vector>

#include "ecal_config_reader.h"
#include "ecal_config_reader_hlp.h"
Expand Down
5 changes: 4 additions & 1 deletion src/core/src/config/ecal_config_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
* @brief Global config class
**/

#include <ecal/ecal_os.h>
#include <cctype>
#include <ecal/ecal_defs.h>
#include <ecal/ecal_os.h>

#include "ecal_def.h"
#include "ecal_config_reader.h"
Expand All @@ -35,6 +36,8 @@
#include <fstream>

#include <ecal_utils/filesystem.h>
#include <string>
#include <vector>

#ifdef ECAL_OS_LINUX
#include <sys/types.h>
Expand Down
5 changes: 4 additions & 1 deletion src/core/src/ecal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
**/

#include "ecal_def.h"
#include "ecal_globals.h"
#include "ecal_event.h"
#include "ecal_globals.h"
#include <cstddef>
#include <string>
#include <vector>

#if ECAL_CORE_COMMAND_LINE
#include "util/advanced_tclap_output.h"
Expand Down
7 changes: 6 additions & 1 deletion src/core/src/ecal_descgate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@
#include <ecal/ecal_config.h>

#include "ecal_descgate.h"
#include <cassert>
#include <algorithm>
#include <cassert>
#include <mutex>
#include <shared_mutex>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>

namespace eCAL
{
Expand Down
11 changes: 6 additions & 5 deletions src/core/src/ecal_descgate.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,23 @@

#pragma once

#include <ecal/ecal_util.h>
#include <chrono>
#include <ecal/ecal_types.h>
#include <ecal/ecal_util.h>

#include "ecal_global_accessors.h"
#include "ecal_def.h"
#include "util/ecal_expmap.h"

#include <shared_mutex>
#include <string>
#include <map>
#include <unordered_map>
#include <memory>
#include <shared_mutex>
#include <string>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <vector>


namespace eCAL
{
class CDescGate
Expand Down
3 changes: 3 additions & 0 deletions src/core/src/ecal_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@
* @brief eCAL handle helper class
**/

#include <chrono>
#include <cstdint>
#include <ecal/ecal_os.h>

#include "ecal_event.h"

#include <sstream>
#include <string>

#ifdef ECAL_OS_WINDOWS

Expand Down
4 changes: 3 additions & 1 deletion src/core/src/ecal_global_accessors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
* @brief eCAL core functions
**/

#include "ecal_def.h"
#include "ecal_global_accessors.h"
#include "ecal_def.h"
#include "ecal_globals.h"
#include <atomic>
#include <string>

namespace eCAL
{
Expand Down
3 changes: 3 additions & 0 deletions src/core/src/ecal_globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
#include "config/ecal_config_reader.h"

#include <iostream>
#include <memory>
#include <stdexcept>
#include <string>
#include <vector>

#if ECAL_CORE_SERVICE
#include "service/ecal_service_singleton_manager.h"
Expand Down
2 changes: 2 additions & 0 deletions src/core/src/ecal_globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#pragma once

#include "ecal_global_accessors.h"
#include <string>
#include <vector>
#if ECAL_CORE_REGISTRATION
#include "registration/ecal_registration_provider.h"
#include "registration/ecal_registration_receiver.h"
Expand Down
6 changes: 4 additions & 2 deletions src/core/src/ecal_process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* @brief eCAL process interface
**/

#include <cstdint>
#include <ecal/ecal.h>

#include "ecal_def.h"
Expand All @@ -38,15 +39,16 @@
#include <array>
#include <atomic>
#include <chrono>
#include <cstdlib>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <memory>
#include <string>
#include <sstream>
#include <string>
#include <thread>
#include <vector>

#ifdef ECAL_OS_WINDOWS
#include "ecal_win_main.h"
Expand Down
3 changes: 2 additions & 1 deletion src/core/src/ecal_process_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
* ========================= eCAL LICENSE =================================
*/

#include <errno.h>
#include <string>
#include <sys/file.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>

#include <string.h>
#include <iostream>
Expand Down
5 changes: 5 additions & 0 deletions src/core/src/ecal_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@
#include "pubsub/ecal_pubgate.h"

#include <list>
#include <map>
#include <string>
#include <tuple>
#include <unordered_map>
#include <utility>
#include <vector>

namespace eCAL
{
Expand Down
5 changes: 5 additions & 0 deletions src/core/src/ecalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@
* @brief Implementation of the eCAL dll interface
**/

#include <cstddef>
#include <cstdlib>
#include <functional>
#include <mutex>

#include <ecal/ecal.h>
#include <ecal/ecalc.h>
#include <set>
#include <string>

static int CopyBuffer(void* target_, int target_len_, const std::string& source_s_)
{
Expand Down
3 changes: 3 additions & 0 deletions src/core/src/io/mtx/ecal_named_mutex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
* @brief eCAL named mutex
**/

#include <cstdint>
#include <ecal/ecal_os.h>
#include <memory>
#include <string>

#include "ecal_named_mutex.h"

Expand Down
2 changes: 2 additions & 0 deletions src/core/src/io/mtx/linux/ecal_named_mutex_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#pragma once

#include "io/mtx/ecal_named_mutex_base.h"
#include <cstdint>
#include <string>

typedef struct named_mutex named_mutex_t;

Expand Down
Loading

0 comments on commit 19453ce

Please sign in to comment.