Skip to content

Commit 07c24e9

Browse files
authored
[Core] Cover cpplint for /src/ray/core_worker (excluding transport) (#51557)
Signed-off-by: Tatsuya Nishiyama <nishiyama.tatsuya0@gmail.com>
1 parent 49629ef commit 07c24e9

File tree

66 files changed

+324
-67
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+324
-67
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,12 @@ repos:
4747
hooks:
4848
- id: cpplint
4949
args: ["--filter=-whitespace/braces,-whitespace/line_length,-build/c++11,-build/c++14,-build/c++17,-readability/braces,-whitespace/indent_namespace,-runtime/int,-runtime/references,-build/include_order"]
50-
files: ^src/ray/(util|raylet_client|internal|scheduling|pubsub|object_manager|rpc(?:/.*)?|raylet|core_worker/transport)/.*\.(h|cc)$
51-
exclude: ^src/ray/raylet/scheduling/.*\.(h|cc)$
50+
files: ^src/ray/(util|raylet_client|internal|scheduling|pubsub|object_manager|rpc(?:/.*)?|raylet|core_worker)/.*\.(h|cc)$
51+
exclude: |
52+
(?x)^(
53+
src/ray/raylet/scheduling/.*\.(h|cc)$ |
54+
src/ray/core_worker/lib/java/.*\.h$
55+
)
5256
5357
- repo: https://github.com/keith/pre-commit-buildifier
5458
rev: 8.0.1

src/ray/core_worker/actor_creator.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
// limitations under the License.
1414

1515
#pragma once
16+
1617
#include <memory>
18+
#include <utility>
19+
#include <vector>
1720

1821
#include "ray/common/ray_config.h"
1922
#include "ray/gcs/gcs_client/gcs_client.h"

src/ray/core_worker/actor_handle.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#include "ray/core_worker/actor_handle.h"
1616

1717
#include <memory>
18+
#include <string>
19+
#include <unordered_map>
1820

1921
namespace ray {
2022
namespace core {

src/ray/core_worker/actor_handle.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616

1717
#include <gtest/gtest_prod.h>
1818

19+
#include <string>
20+
#include <unordered_map>
21+
#include <utility>
22+
1923
#include "absl/types/optional.h"
2024
#include "ray/common/id.h"
2125
#include "ray/common/task/task_util.h"
@@ -29,7 +33,7 @@ namespace core {
2933

3034
class ActorHandle {
3135
public:
32-
ActorHandle(rpc::ActorHandle inner) : inner_(std::move(inner)) {}
36+
explicit ActorHandle(rpc::ActorHandle inner) : inner_(std::move(inner)) {}
3337

3438
// Constructs a new ActorHandle as part of the actor creation process.
3539
ActorHandle(const ActorID &actor_id,

src/ray/core_worker/actor_manager.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414

1515
#include "ray/core_worker/actor_manager.h"
1616

17+
#include <memory>
18+
#include <string>
19+
#include <utility>
20+
#include <vector>
21+
1722
#include "ray/gcs/pb_util.h"
1823

1924
namespace ray {

src/ray/core_worker/actor_manager.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616

1717
#include <gtest/gtest_prod.h>
1818

19+
#include <memory>
20+
#include <string>
1921
#include <utility>
22+
#include <vector>
2023

2124
#include "absl/container/flat_hash_map.h"
2225
#include "ray/core_worker/actor_creator.h"

src/ray/core_worker/common.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414

1515
#include "ray/core_worker/common.h"
1616

17+
#include <memory>
18+
#include <string>
19+
#include <unordered_map>
20+
#include <utility>
21+
#include <vector>
22+
1723
namespace ray {
1824
namespace core {
1925

src/ray/core_worker/common.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414

1515
#pragma once
1616

17+
#include <memory>
1718
#include <string>
19+
#include <unordered_map>
20+
#include <utility>
21+
#include <vector>
1822

1923
#include "ray/common/id.h"
2024
#include "ray/common/ray_object.h"

src/ray/core_worker/context.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
#include <google/protobuf/util/json_util.h>
1818

19+
#include <memory>
20+
#include <string>
21+
1922
#include "ray/common/runtime_env_common.h"
2023

2124
namespace ray {

src/ray/core_worker/context.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include <boost/thread.hpp>
1818
#include <memory>
19+
#include <string>
1920

2021
#include "absl/base/thread_annotations.h"
2122
#include "absl/synchronization/mutex.h"

0 commit comments

Comments
 (0)