Skip to content

Commit

Permalink
Fix clang-tidy IWYU checks with pragmas
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanel committed Sep 14, 2024
1 parent dc8c195 commit 662f875
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 8 deletions.
7 changes: 2 additions & 5 deletions .clang-tidy-ignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
**/json.hpp
*json.hpp

# Ignore all protobuf/gRPC generated source files
**/*.pb.cc

*/_deps/*
*/_deps/*
1 change: 1 addition & 0 deletions src/api/common/src/exchangepublicapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "cct_allocator.hpp"
#include "cct_exception.hpp"
#include "cct_flatset.hpp"
#include "cct_log.hpp"
#include "cct_smallset.hpp"
#include "cct_smallvector.hpp"
#include "cct_vector.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/api/common/src/fiatconverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <utility>

#include "cct_json.hpp"
#include "cct_log.hpp"
#include "cct_string.hpp"
#include "coincenterinfo.hpp"
#include "curloptions.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/api/common/src/ssl_sha.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <openssl/hmac.h>
#include <openssl/opensslv.h>
#include <openssl/sha.h>
#include <openssl/types.h>

#include <algorithm>
#include <array>
Expand Down
1 change: 1 addition & 0 deletions src/api/exchanges/src/binanceprivateapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "cachedresult.hpp"
#include "cct_exception.hpp"
#include "cct_json.hpp"
#include "cct_log.hpp"
#include "cct_smallvector.hpp"
#include "cct_string.hpp"
#include "closed-order.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/main/src/processcommandsfromcli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <string_view>

#include "cct_exception.hpp"
#include "cct_log.hpp"
#include "coincenter-commands-processor.hpp"
#include "coincenter.hpp"
#include "coincenterinfo.hpp"
Expand Down
3 changes: 1 addition & 2 deletions src/objects/src/monetaryamount.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <cassert>
#include <cmath>
#include <compare>
#include <concepts>
#include <cstdint>
#include <cstdlib>
#include <iomanip>
Expand All @@ -15,13 +14,13 @@
#include <ranges>
#include <sstream>
#include <string_view>
#include <tuple>
#include <type_traits>
#include <utility>

#include "cct_config.hpp"
#include "cct_exception.hpp"
#include "cct_invalid_argument_exception.hpp"
#include "cct_log.hpp"
#include "currencycode.hpp"
#include "ipow.hpp"
#include "ndigits.hpp"
Expand Down
8 changes: 8 additions & 0 deletions src/serialization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,16 @@ if(CCT_ENABLE_PROTO)
TARGET coincenter_serialization
IMPORT_DIRS "${CMAKE_CURRENT_LIST_DIR}/proto"
PROTOC_OUT_DIR "${PROTO_BINARY_DIR}"
OUT_VAR PROTO_GENERATED_FILES
)

if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.27.0")
set_source_files_properties(${PROTO_GENERATED_FILES}
PROPERTIES
SKIP_LINTING ON
)
endif()

add_unit_test(
continuous-iterator_test
test/continuous-iterator_test.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/tech/include/cct_log.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifdef CCT_DISABLE_SPDLOG
#include <string_view>
#else
#include <spdlog/spdlog.h>
#include <spdlog/spdlog.h> // IWYU pragma: export
#endif

namespace cct {
Expand Down

0 comments on commit 662f875

Please sign in to comment.