Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename inline headers #2504

Merged
merged 4 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .linters/cpp/hooks/pre-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ if [ $# -eq 0 ];then
echo "You have unstaged changes, please stage or stash them first."
exit 1
fi
CHECK_FILES=$(git diff --name-only --diff-filter=ACMRTUXB HEAD | egrep '.*\.cpp$|.*\.h$|.*\.inl$' | grep -v 'com_vesoft_client_NativeClient.h' | grep -v 'com_vesoft_nebula_NebulaCodec.h')
CHECK_FILES=$(git diff --name-only --diff-filter=ACMRTUXB HEAD | egrep '.*\.cpp$|.*\.h$' | grep -v 'com_vesoft_client_NativeClient.h' | grep -v 'com_vesoft_nebula_NebulaCodec.h')
else
CHECK_FILES=$(find $@ -not \( -path src/CMakeFiles -prune \) \
-not \( -path src/interface/gen-cpp2 -prune \) \
-name "*.[h]" -o -name "*.cpp" -o -name '*.inl' \
-name "*.[h]" -o -name "*.cpp" \
| grep -v 'GraphScanner.*' | grep -v 'GraphParser.*' \
| grep -v 'com_vesoft_client_NativeClient.h' \
| grep -v 'com_vesoft_nebula_NebulaCodec.h')
Expand All @@ -43,7 +43,7 @@ fi

echo "Performing C++ linters..."

CPPLINT_EXTENS=cpp,h,inl
CPPLINT_EXTENS=cpp,h
CPPLINT_FILTER=-whitespace/indent,-build/include_what_you_use,-readability/todo,-build/include,-build/header_guard,-runtime/references,-build/c++11

python3 $CPPLINT --quiet --extensions=$CPPLINT_EXTENS \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/

#pragma once

#include <folly/Try.h>
#include "common/time/WallClock.h"

namespace nebula {
namespace storage {

namespace {

template<class Request, class RemoteFunc, class Response>
struct ResponseContext {
public:
Expand Down Expand Up @@ -68,7 +68,6 @@ struct ResponseContext {
bool fulfilled_{false};
};

} // Anonymous namespace


template<typename ClientType>
Expand Down
2 changes: 1 addition & 1 deletion src/clients/storage/StorageClientBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,6 @@ class StorageClientBase {
} // namespace storage
} // namespace nebula

#include "clients/storage/StorageClientBase.inl"
#include "clients/storage/StorageClientBase-inl.h"

#endif // CLIENTS_STORAGE_STORAGECLIENTBASE_H_
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/

#pragma once

namespace nebula {

template<typename T>
Expand Down Expand Up @@ -46,4 +48,3 @@ RowWriterV1::writeInt(T v) {
}

} // namespace nebula

2 changes: 1 addition & 1 deletion src/codec/test/RowWriterV1.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class RowWriterV1 {
} // namespace nebula


#include "codec/test/RowWriterV1.inl"
#include "codec/test/RowWriterV1-inl.h"

#endif // CODEC_TEST_ROWWRITERV1_H_

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/

#pragma once

#include <folly/ExceptionWrapper.h>

namespace nebula {
Expand Down
2 changes: 1 addition & 1 deletion src/common/base/CollectNSucceeded.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ auto collectNSucceeded(Collection&& c,

} // namespace nebula

#include "common/base/CollectNSucceeded.inl"
#include "common/base/CollectNSucceeded-inl.h"

#endif // COMMON_BASE_COLLECTNSUCCEEDED_H_
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

#include "common/datatypes/CommonCpp2Ops.h"
#include "common/datatypes/Value.h"
#include "common/datatypes/DataSetOps.inl"
#include "common/datatypes/DateOps.inl"
#include "common/datatypes/PathOps.inl"
#include "common/datatypes/VertexOps.inl"
#include "common/datatypes/EdgeOps.inl"
#include "common/datatypes/ListOps.inl"
#include "common/datatypes/MapOps.inl"
#include "common/datatypes/SetOps.inl"
#include "common/datatypes/DataSetOps-inl.h"
#include "common/datatypes/DateOps-inl.h"
#include "common/datatypes/PathOps-inl.h"
#include "common/datatypes/VertexOps-inl.h"
#include "common/datatypes/EdgeOps-inl.h"
#include "common/datatypes/ListOps-inl.h"
#include "common/datatypes/MapOps-inl.h"
#include "common/datatypes/SetOps-inl.h"

namespace apache {
namespace thrift {
Expand Down
2 changes: 1 addition & 1 deletion src/common/expression/Expression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <thrift/lib/cpp2/protocol/Serializer.h>

#include "common/datatypes/ValueOps.inl"
#include "common/datatypes/ValueOps-inl.h"
#include "common/expression/ArithmeticExpression.h"
#include "common/expression/AttributeExpression.h"
#include "common/expression/ConstantExpression.h"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/

#pragma once

namespace nebula {
namespace stats {

Expand All @@ -29,4 +31,3 @@ StatsManager::VT StatsManager::readValue(StatsHolder& stats,

} // namespace stats
} // namespace nebula

2 changes: 1 addition & 1 deletion src/common/stats/StatsManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,6 @@ class StatsManager final {
} // namespace stats
} // namespace nebula

#include "common/stats/StatsManager.inl"
#include "common/stats/StatsManager-inl.h"

#endif // COMMON_STATS_STATSMANAGER_H_
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/

#pragma once

#include <thrift/lib/cpp2/async/HeaderClientChannel.h>
#include <folly/io/async/AsyncSocket.h>
#include <folly/system/ThreadName.h>
Expand Down
2 changes: 1 addition & 1 deletion src/common/thrift/ThriftClientManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ class ThriftClientManager final {
} // namespace thrift
} // namespace nebula

#include "common/thrift/ThriftClientManager.inl"
#include "common/thrift/ThriftClientManager-inl.h"

#endif // COMMON_THRIFT_THRIFTCLIENTMANAGER_H_
22 changes: 11 additions & 11 deletions src/interface/common.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ namespace csharp nebula
namespace py nebula2.common

cpp_include "common/thrift/ThriftTypes.h"
cpp_include "common/datatypes/DateOps.inl"
cpp_include "common/datatypes/VertexOps.inl"
cpp_include "common/datatypes/EdgeOps.inl"
cpp_include "common/datatypes/PathOps.inl"
cpp_include "common/datatypes/ValueOps.inl"
cpp_include "common/datatypes/MapOps.inl"
cpp_include "common/datatypes/ListOps.inl"
cpp_include "common/datatypes/SetOps.inl"
cpp_include "common/datatypes/DataSetOps.inl"
cpp_include "common/datatypes/KeyValueOps.inl"
cpp_include "common/datatypes/HostAddrOps.inl"
cpp_include "common/datatypes/DateOps-inl.h"
cpp_include "common/datatypes/VertexOps-inl.h"
cpp_include "common/datatypes/EdgeOps-inl.h"
cpp_include "common/datatypes/PathOps-inl.h"
cpp_include "common/datatypes/ValueOps-inl.h"
cpp_include "common/datatypes/MapOps-inl.h"
cpp_include "common/datatypes/ListOps-inl.h"
cpp_include "common/datatypes/SetOps-inl.h"
cpp_include "common/datatypes/DataSetOps-inl.h"
cpp_include "common/datatypes/KeyValueOps-inl.h"
cpp_include "common/datatypes/HostAddrOps-inl.h"

/*
*
Expand Down
14 changes: 7 additions & 7 deletions src/interface/graph.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ namespace py nebula2.graph

include "common.thrift"

cpp_include "common/graph/PairOps.inl"
cpp_include "common/graph/ProfilingStatsOps.inl"
cpp_include "common/graph/PlanNodeBranchInfoOps.inl"
cpp_include "common/graph/PlanNodeDescriptionOps.inl"
cpp_include "common/graph/PlanDescriptionOps.inl"
cpp_include "common/graph/ExecutionResponseOps.inl"
cpp_include "common/graph/AuthResponseOps.inl"
cpp_include "common/graph/PairOps-inl.h"
cpp_include "common/graph/ProfilingStatsOps-inl.h"
cpp_include "common/graph/PlanNodeBranchInfoOps-inl.h"
cpp_include "common/graph/PlanNodeDescriptionOps-inl.h"
cpp_include "common/graph/PlanDescriptionOps-inl.h"
cpp_include "common/graph/ExecutionResponseOps-inl.h"
cpp_include "common/graph/AuthResponseOps-inl.h"

/*
*
Expand Down
2 changes: 1 addition & 1 deletion src/kvstore/LogEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "common/base/Base.h"
#include "common/time/WallClock.h"
#include "common/datatypes/HostAddrOps.inl"
#include "common/datatypes/HostAddrOps-inl.h"
#include "kvstore/LogEncoder.h"
#include <thrift/lib/cpp2/protocol/Serializer.h>
#include <thrift/lib/cpp2/protocol/CompactProtocol.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/

#pragma once

#include "meta/processors/BaseProcessor.h"

namespace nebula {
Expand Down
2 changes: 1 addition & 1 deletion src/meta/processors/BaseProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class BaseProcessor {
} // namespace meta
} // namespace nebula

#include "meta/processors/BaseProcessor.inl"
#include "meta/processors/BaseProcessor-inl.h"

#endif // META_BASEPROCESSOR_H_

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/

#pragma once

#include "storage/BaseProcessor.h"

namespace nebula {
Expand Down
2 changes: 1 addition & 1 deletion src/storage/BaseProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,6 @@ class BaseProcessor {
} // namespace storage
} // namespace nebula

#include "storage/BaseProcessor.inl"
#include "storage/BaseProcessor-inl.h"

#endif // STORAGE_BASEPROCESSOR_H_
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/

#pragma once

#include "LookupBaseProcessor.h"
namespace nebula {
namespace storage {
Expand Down
2 changes: 1 addition & 1 deletion src/storage/index/LookupBaseProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ class LookupBaseProcessor : public BaseProcessor<RESP> {
} // namespace storage
} // namespace nebula

#include "storage/index/LookupBaseProcessor.inl"
#include "storage/index/LookupBaseProcessor-inl.h"
#endif // STORAGE_QUERY_LOOKUPBASEPROCESSOR_H_
2 changes: 1 addition & 1 deletion src/storage/query/QueryBaseProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,6 @@ class QueryBaseProcessor : public BaseProcessor<RESP> {
} // namespace storage
} // namespace nebula

#include "storage/query/QueryBaseProcessor.inl"
#include "storage/query/QueryBaseProcessor-inl.h"

#endif // STORAGE_QUERY_QUERYBASEPROCESSOR_H_