Skip to content

Commit

Permalink
Fix clang-tidy warnings about includes
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanel committed Oct 21, 2023
1 parent 4a120ff commit 75cfdfa
Show file tree
Hide file tree
Showing 81 changed files with 755 additions and 93 deletions.
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Checks: "-*,\
google-readability-casting,\
misc-*,\
-misc-non-private-member-variables-in-classes,\
-misc-include-cleaner,\
-misc-const-correctness,\
modernize-*,\
-modernize-avoid-c-arrays,\
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ else()

if(CLANG_TIDY)
message(STATUS "Activate clang-tidy")
set(CMAKE_CXX_CLANG_TIDY "clang-tidy")
set(CMAKE_CXX_CLANG_TIDY clang-tidy)
else()
message(FATAL_ERROR "clang-tidy executable cannot be found")
endif()
Expand Down
2 changes: 1 addition & 1 deletion src/api-objects/include/tradedamounts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct TradedAmounts {
return *this;
}

bool operator==(const TradedAmounts &) const = default;
constexpr bool operator==(const TradedAmounts &) const = default;

friend std::ostream &operator<<(std::ostream &os, const TradedAmounts &tradedAmounts);

Expand Down
4 changes: 4 additions & 0 deletions src/api-objects/src/tradedamounts.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#include "tradedamounts.hpp"

#include <ostream>

#include "cct_string.hpp"

namespace cct {

string TradedAmounts::str() const {
Expand Down
36 changes: 36 additions & 0 deletions src/api/common/src/exchangeprivateapi.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,51 @@
#include "exchangeprivateapi.hpp"

#include <algorithm>
#include <chrono>
#include <cstdint>
#include <limits>
#include <map>
#include <optional>
#include <span>
#include <string_view>
#include <thread>
#include <tuple>
#include <utility>

#include "apikey.hpp"
#include "balanceoptions.hpp"
#include "balanceportfolio.hpp"
#include "cct_log.hpp"
#include "cct_vector.hpp"
#include "coincenterinfo.hpp"
#include "currencycode.hpp"
#include "deposit.hpp"
#include "depositsconstraints.hpp"
#include "exchangebase.hpp"
#include "exchangeinfo.hpp"
#include "exchangename.hpp"
#include "exchangeprivateapitypes.hpp"
#include "exchangepublicapi.hpp"
#include "exchangepublicapitypes.hpp"
#include "market.hpp"
#include "marketorderbook.hpp"
#include "monetaryamount.hpp"
#include "monetaryamountbycurrencyset.hpp"
#include "orderid.hpp"
#include "priceoptions.hpp"
#include "priceoptionsdef.hpp"
#include "recentdeposit.hpp"
#include "timedef.hpp"
#include "tradedamounts.hpp"
#include "tradedefinitions.hpp"
#include "tradeinfo.hpp"
#include "tradeside.hpp"
#include "unreachable.hpp"
#include "withdraw.hpp"
#include "withdrawinfo.hpp"
#include "withdrawoptions.hpp"
#include "withdrawordeposit.hpp"
#include "withdrawsconstraints.hpp"

namespace cct::api {

Expand Down
11 changes: 11 additions & 0 deletions src/api/common/test/exchangepublicapi_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,24 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>

#include <optional>

#include "cct_const.hpp"
#include "cct_exception.hpp"
#include "coincenterinfo.hpp"
#include "commonapi.hpp"
#include "currencycode.hpp"
#include "exchangeinfo.hpp"
#include "exchangepublicapi_mock.hpp"
#include "exchangepublicapitypes.hpp"
#include "fiatconverter.hpp"
#include "loadconfiguration.hpp"
#include "market.hpp"
#include "marketorderbook.hpp"
#include "monetaryamount.hpp"
#include "runmodes.hpp"
#include "timedef.hpp"
#include "volumeandpricenbdecimals.hpp"

namespace cct::api {
class ExchangePublicTest : public ::testing::Test {
Expand Down
34 changes: 32 additions & 2 deletions src/api/exchanges/src/bithumbprivateapi.cpp
Original file line number Diff line number Diff line change
@@ -1,25 +1,55 @@
#include "bithumbprivateapi.hpp"

#include <algorithm>
#include <cassert>
#include <execution>
#include <array>
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <string_view>
#include <thread>
#include <utility>

#include "accountowner.hpp"
#include "apikey.hpp"
#include "apiquerytypeenum.hpp"
#include "balanceoptions.hpp"
#include "balanceportfolio.hpp"
#include "bithumbpublicapi.hpp"
#include "cachedresult.hpp"
#include "cct_exception.hpp"
#include "cct_fixedcapacityvector.hpp"
#include "cct_json.hpp"
#include "cct_log.hpp"
#include "cct_smallvector.hpp"
#include "cct_string.hpp"
#include "codec.hpp"
#include "coincenterinfo.hpp"
#include "curlhandle.hpp"
#include "curloptions.hpp"
#include "currencycode.hpp"
#include "exchangeinfo.hpp"
#include "exchangeprivateapitypes.hpp"
#include "exchangepublicapitypes.hpp"
#include "file.hpp"
#include "httprequesttype.hpp"
#include "monetaryamount.hpp"
#include "order.hpp"
#include "ordersconstraints.hpp"
#include "runmodes.hpp"
#include "ssl_sha.hpp"
#include "stringhelpers.hpp"
#include "timedef.hpp"
#include "timestring.hpp"
#include "tradedamounts.hpp"
#include "tradeinfo.hpp"
#include "tradeoptions.hpp"
#include "tradeside.hpp"
#include "wallet.hpp"
#include "withdraw.hpp"
#include "withdrawordeposit.hpp"
#include "withdrawsconstraints.hpp"
#include "withdrawsordepositsconstraints.hpp"

namespace cct::api {
namespace {
Expand Down
19 changes: 18 additions & 1 deletion src/api/exchanges/src/bithumbpublicapi.cpp
Original file line number Diff line number Diff line change
@@ -1,21 +1,38 @@
#include "bithumbpublicapi.hpp"

#include <algorithm>
#include <cassert>
#include <ctime>
#include <iterator>
#include <memory>
#include <optional>
#include <sstream>
#include <string>
#include <string_view>
#include <utility>

#include "apiquerytypeenum.hpp"
#include "cachedresult.hpp"
#include "cct_exception.hpp"
#include "cct_json.hpp"
#include "cct_log.hpp"
#include "cct_string.hpp"
#include "cct_vector.hpp"
#include "coincenterinfo.hpp"
#include "commonapi.hpp"
#include "curlhandle.hpp"
#include "curloptions.hpp"
#include "currencycode.hpp"
#include "currencyexchange.hpp"
#include "exchangepublicapitypes.hpp"
#include "fiatconverter.hpp"
#include "httprequesttype.hpp"
#include "market.hpp"
#include "marketorderbook.hpp"
#include "monetaryamount.hpp"
#include "permanentcurloptions.hpp"
#include "stringhelpers.hpp"
#include "timestring.hpp"
#include "tradeside.hpp"

namespace cct::api {
namespace {
Expand Down
39 changes: 38 additions & 1 deletion src/api/exchanges/src/krakenprivateapi.cpp
Original file line number Diff line number Diff line change
@@ -1,21 +1,58 @@
#include "krakenprivateapi.hpp"

#include <cassert>
#include <algorithm>
#include <chrono>
#include <cstdint>
#include <memory>
#include <string_view>
#include <thread>
#include <utility>

#include "apikey.hpp"
#include "apiquerytypeenum.hpp"
#include "balanceoptions.hpp"
#include "balanceportfolio.hpp"
#include "cachedresult.hpp"
#include "cct_exception.hpp"
#include "cct_json.hpp"
#include "cct_log.hpp"
#include "cct_string.hpp"
#include "cct_vector.hpp"
#include "codec.hpp"
#include "coincenterinfo.hpp"
#include "commonapi.hpp"
#include "curlhandle.hpp"
#include "curloptions.hpp"
#include "currencycode.hpp"
#include "currencyexchange.hpp"
#include "deposit.hpp"
#include "depositsconstraints.hpp"
#include "exchangeinfo.hpp"
#include "exchangename.hpp"
#include "exchangeprivateapi.hpp"
#include "exchangeprivateapitypes.hpp"
#include "exchangepublicapitypes.hpp"
#include "httprequesttype.hpp"
#include "krakenpublicapi.hpp"
#include "market.hpp"
#include "monetaryamount.hpp"
#include "order.hpp"
#include "orderid.hpp"
#include "ordersconstraints.hpp"
#include "permanentcurloptions.hpp"
#include "ssl_sha.hpp"
#include "stringhelpers.hpp"
#include "timedef.hpp"
#include "timestring.hpp"
#include "toupperlower.hpp"
#include "tradedamounts.hpp"
#include "tradeinfo.hpp"
#include "tradeside.hpp"
#include "wallet.hpp"
#include "withdraw.hpp"
#include "withdrawinfo.hpp"
#include "withdrawordeposit.hpp"
#include "withdrawsconstraints.hpp"

namespace cct::api {
namespace {
Expand Down
43 changes: 41 additions & 2 deletions src/api/exchanges/src/kucoinprivateapi.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,55 @@
#include "kucoinprivateapi.hpp"

#include <thread>
#include <algorithm>
#include <cassert>
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <string_view>
#include <utility>

#include "apikey.hpp"
#include "apiquerytypeenum.hpp"
#include "balanceoptions.hpp"
#include "balanceportfolio.hpp"
#include "cachedresult.hpp"
#include "cct_exception.hpp"
#include "cct_json.hpp"
#include "cct_log.hpp"
#include "cct_string.hpp"
#include "codec.hpp"
#include "coincenterinfo.hpp"
#include "commonapi.hpp"
#include "curlhandle.hpp"
#include "curloptions.hpp"
#include "currencycode.hpp"
#include "deposit.hpp"
#include "depositsconstraints.hpp"
#include "exchangeinfo.hpp"
#include "exchangename.hpp"
#include "exchangeprivateapi.hpp"
#include "exchangeprivateapitypes.hpp"
#include "exchangepublicapitypes.hpp"
#include "httprequesttype.hpp"
#include "kucoinpublicapi.hpp"
#include "market.hpp"
#include "monetaryamount.hpp"
#include "order.hpp"
#include "orderid.hpp"
#include "ordersconstraints.hpp"
#include "permanentcurloptions.hpp"
#include "ssl_sha.hpp"
#include "stringhelpers.hpp"
#include "timedef.hpp"
#include "timestring.hpp"
#include "toupperlower.hpp"
#include "tradedamounts.hpp"
#include "tradeinfo.hpp"
#include "tradeside.hpp"
#include "wallet.hpp"
#include "withdraw.hpp"
#include "withdrawinfo.hpp"
#include "withdrawordeposit.hpp"
#include "withdrawsconstraints.hpp"

namespace cct::api {

Expand Down
Loading

0 comments on commit 75cfdfa

Please sign in to comment.