-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Description
While I am trying to check our gRPC usage and imporve the distributed training performance, I dived into the pacakge fluid/operators/detail and noticed that cpplint report many errors about the code style violation.
(.env) yi@idgsim-gpu-001 detail (rename_serde_test)*$ cpplint *
bytebuffer_stream.cc:20: Include the directory when naming .h files [build/include_subdir] [4]
Done processing bytebuffer_stream.cc
bytebuffer_stream.h:59: Using C-style cast. Use static_cast<int>(...) instead [readability/casting] [4]
bytebuffer_stream.h:71: Using C-style cast. Use static_cast<int>(...) instead [readability/casting] [4]
bytebuffer_stream.h:140: Add #include <vector> for vector<> [build/include_what_you_use] [4]
Done processing bytebuffer_stream.h
Ignoring CMakeLists.txt; not a valid file name (c, cc, h, hpp, c++, h++, cu, cpp, hxx, cxx, cuh)
Done processing CMakeLists.txt
grpc_client.cc:15: Include the directory when naming .h files [build/include_subdir] [4]
grpc_client.cc:55: Using C-style cast. Use reinterpret_cast<void*>(...) instead [readability/casting] [4]
grpc_client.cc:112: Using C-style cast. Use reinterpret_cast<void*>(...) instead [readability/casting] [4]
grpc_client.cc:129: Using C-style cast. Use reinterpret_cast<void*>(...) instead [readability/casting] [4]
grpc_client.cc:141: Using C-style cast. Use reinterpret_cast<void*>(...) instead [readability/casting] [4]
grpc_client.cc:209: Add #include <limits> for numeric_limits<> [build/include_what_you_use] [4]
Done processing grpc_client.cc
grpc_client.h:20: <chrono> is an unapproved C++11 header. [build/c++11] [5]
grpc_client.h:28: Found C system header after C++ system header. Should be: grpc_client.h, c system, c++ system, other. [build/include_order] [4]
grpc_client.h:29: "grpc++/grpc++.h" already included at grpc_client.h:17 [build/include] [4]
grpc_client.h:30: Found C system header after C++ system header. Should be: grpc_client.h, c system, c++ system, other. [build/include_order] [4]
grpc_client.h:31: Found C system header after C++ system header. Should be: grpc_client.h, c system, c++ system, other. [build/include_order] [4]
Done processing grpc_client.h
grpc_server.cc:225: Using C-style cast. Use reinterpret_cast<RequestBase*>(...) instead [readability/casting] [4]
grpc_server.cc:145: Add #include <limits> for numeric_limits<> [build/include_what_you_use] [4]
grpc_server.cc:208: Add #include <string> for string [build/include_what_you_use] [4]
Done processing grpc_server.cc
grpc_server.h:18: <thread> is an unapproved C++11 header. [build/c++11] [5]
grpc_server.h:38: Add #include <utility> for pair<> [build/include_what_you_use] [4]
grpc_server.h:80: Add #include <string> for string [build/include_what_you_use] [4]
Done processing grpc_server.h
grpc_service.h:117: Namespace should be terminated with "// namespace operators" [readability/namespace] [5]
Done processing grpc_service.h
proto_encoder_helper.h:145: Namespace should be terminated with "// namespace detail" [readability/namespace] [5]
proto_encoder_helper.h:146: Namespace should be terminated with "// namespace operators" [readability/namespace] [5]
proto_encoder_helper.h:147: Namespace should be terminated with "// namespace paddle" [readability/namespace] [5]
proto_encoder_helper.h:107: Add #include <string> for string [build/include_what_you_use] [4]
Done processing proto_encoder_helper.h
Done processing safe_ref.h
sendrecvop_utils.cc:17: <thread> is an unapproved C++11 header. [build/c++11] [5]
sendrecvop_utils.cc:45: Using C-style cast. Use reinterpret_cast<char*>(...) instead [readability/casting] [4]
sendrecvop_utils.cc:155: Using C-style cast. Use reinterpret_cast<char*>(...) instead [readability/casting] [4]
sendrecvop_utils.cc:184: Is this a non-const reference? If so, make const or use a pointer: framework::Variable*& var [runtime/references] [2]
Done processing sendrecvop_utils.cc
sendrecvop_utils.h:54: Is this a non-const reference? If so, make const or use a pointer: framework::Variable*& var [runtime/references] [2]
Done processing sendrecvop_utils.h
Ignoring send_recv.proto; not a valid file name (c, cc, h, hpp, c++, h++, cu, cpp, hxx, cxx, cuh)
Done processing send_recv.proto
serde_test.cc:17: <thread> is an unapproved C++11 header. [build/c++11] [5]
serde_test.cc:19: Found C system header after C++ system header. Should be: serde_test.h, c system, c++ system, other. [build/include_order] [4]
Done processing serde_test.cc
simple_block_queue.h:17: <condition_variable> is an unapproved C++11 header. [build/c++11] [5]
simple_block_queue.h:19: <mutex> is an unapproved C++11 header. [build/c++11] [5]
Done processing simple_block_queue.h
Done processing strided_memcpy.h
variable_response.cc:265: Add #include <string> for string [build/include_what_you_use] [4]
variable_response.cc:335: Add #include <utility> for pair<> [build/include_what_you_use] [4]
variable_response.cc:338: Add #include <vector> for vector<> [build/include_what_you_use] [4]
Done processing variable_response.cc
variable_response.h:63: Is this a non-const reference? If so, make const or use a pointer: framework::DDim& dims [runtime/references] [2]
variable_response.h:70: Is this a non-const reference? If so, make const or use a pointer: framework::DDim& dims [runtime/references] [2]
variable_response.h:55: Add #include <string> for string [build/include_what_you_use] [4]
Done processing variable_response.h
Total errors found: 41
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels