ci: Redo format.sh --all script & backfill lint fixes (#9956)

This commit is contained in:
Barak Michener
2020-08-07 16:49:49 -07:00
committed by GitHub
parent 1d01c668f0
commit 8e76796fd0
147 changed files with 702 additions and 636 deletions
+1
View File
@@ -15,6 +15,7 @@
#pragma once
#include <flatbuffers/flatbuffers.h>
#include <unordered_set>
#include "ray/common/id.h"
-1
View File
@@ -13,7 +13,6 @@
// limitations under the License.
#include "gtest/gtest.h"
#include "ray/common/common_protocol.h"
#include "ray/common/task/task_spec.h"
@@ -4,7 +4,6 @@
#include <sstream>
#include "absl/container/flat_hash_map.h"
#include "ray/common/bundle_spec.h"
#include "ray/util/logging.h"
+2 -2
View File
@@ -1,7 +1,7 @@
#include <sstream>
#include "ray/common/task/task_execution_spec.h"
#include <sstream>
namespace ray {
size_t TaskExecutionSpecification::NumForwards() const {
@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "ray/common/client_connection.h"
#include <boost/asio.hpp>
#include <boost/asio/error.hpp>
#include <list>
@@ -20,8 +22,6 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "ray/common/client_connection.h"
namespace ray {
namespace raylet {
@@ -16,11 +16,11 @@
#include <jni.h>
#include "jni_utils.h"
#include "ray/common/id.h"
#include "ray/core_worker/actor_handle.h"
#include "ray/core_worker/common.h"
#include "ray/core_worker/core_worker.h"
#include "jni_utils.h"
#ifdef __cplusplus
extern "C" {
@@ -13,11 +13,13 @@
// limitations under the License.
#include "io_ray_runtime_context_NativeWorkerContext.h"
#include <jni.h>
#include "jni_utils.h"
#include "ray/common/id.h"
#include "ray/core_worker/context.h"
#include "ray/core_worker/core_worker.h"
#include "jni_utils.h"
#ifdef __cplusplus
extern "C" {
@@ -16,8 +16,8 @@
#include <jni.h>
#include "ray/core_worker/common.h"
#include "jni_utils.h"
#include "ray/core_worker/common.h"
#include "ray/gcs/gcs_client/global_state_accessor.h"
#ifdef __cplusplus
@@ -13,13 +13,14 @@
// limitations under the License.
#include "io_ray_runtime_metric_NativeMetric.h"
#include "jni_utils.h"
#include "ray/stats/metric.h"
#include <jni.h>
#include <algorithm>
#include "jni_utils.h"
#include "opencensus/tags/tag_key.h"
#include "ray/stats/metric.h"
using TagKeyType = opencensus::tags::TagKey;
using TagsType = std::vector<std::pair<opencensus::tags::TagKey, std::string>>;
@@ -13,7 +13,9 @@
// limitations under the License.
#include "io_ray_runtime_object_NativeObjectStore.h"
#include <jni.h>
#include "jni_utils.h"
#include "ray/common/id.h"
#include "ray/core_worker/common.h"
@@ -13,11 +13,13 @@
// limitations under the License.
#include "io_ray_runtime_task_NativeTaskExecutor.h"
#include <jni.h>
#include "jni_utils.h"
#include "ray/common/id.h"
#include "ray/core_worker/common.h"
#include "ray/core_worker/core_worker.h"
#include "jni_utils.h"
#include "ray/raylet_client/raylet_client.h"
#ifdef __cplusplus
+2 -1
View File
@@ -15,6 +15,7 @@
#pragma once
#include <jni.h>
#include <algorithm>
#include "ray/common/buffer.h"
@@ -346,7 +347,7 @@ inline jobject NativeVectorToJavaList(
env->NewObject(java_array_list_class, java_array_list_init_with_capacity,
(jint)native_vector.size());
RAY_CHECK_JAVA_EXCEPTION(env);
for (auto it = native_vector.begin(); it != native_vector.end(); ++it){
for (auto it = native_vector.begin(); it != native_vector.end(); ++it) {
auto element = element_converter(env, *it);
env->CallVoidMethod(java_list, java_list_add, element);
RAY_CHECK_JAVA_EXCEPTION(env);
@@ -13,8 +13,8 @@
// limitations under the License.
#include <thread>
#include "gtest/gtest.h"
#include "gtest/gtest.h"
#include "ray/common/test_util.h"
#include "ray/core_worker/transport/direct_actor_transport.h"
+2 -2
View File
@@ -35,12 +35,12 @@
#pragma once
#include <stdio.h>
#include <iostream>
#include <string>
#include <boost/asio.hpp>
#include <boost/asio/error.hpp>
#include <boost/bind.hpp>
#include <iostream>
#include <string>
#include "ray/gcs/redis_async_context.h"
+1
View File
@@ -18,6 +18,7 @@
#include <memory>
#include <string>
#include <vector>
#include "ray/common/status.h"
#include "ray/gcs/accessor.h"
#include "ray/util/logging.h"
@@ -13,6 +13,7 @@
// limitations under the License.
#include "ray/gcs/gcs_client/service_based_gcs_client.h"
#include "gtest/gtest.h"
#include "ray/common/test_util.h"
#include "ray/gcs/gcs_client/service_based_accessor.h"
@@ -15,6 +15,7 @@
#pragma once
#include <boost/asio.hpp>
#include "ray/gcs/redis_context.h"
namespace ray {
+2 -1
View File
@@ -12,11 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "ray/gcs/pubsub/gcs_pub_sub.h"
#include <memory>
#include "gtest/gtest.h"
#include "ray/common/test_util.h"
#include "ray/gcs/pubsub/gcs_pub_sub.h"
namespace ray {
+2
View File
@@ -15,7 +15,9 @@
#pragma once
#include <stdarg.h>
#include <mutex>
#include "ray/common/status.h"
// These are forward declarations from hiredis.
@@ -15,6 +15,7 @@
#include "ray/gcs/store_client/redis_store_client.h"
#include <functional>
#include "ray/common/ray_config.h"
#include "ray/gcs/redis_context.h"
#include "ray/util/logging.h"
@@ -13,6 +13,7 @@
// limitations under the License.
#include "ray/gcs/store_client/in_memory_store_client.h"
#include "ray/gcs/store_client/test/store_client_test_base.h"
namespace ray {
@@ -13,6 +13,7 @@
// limitations under the License.
#include "ray/gcs/store_client/redis_store_client.h"
#include "ray/common/test_util.h"
#include "ray/gcs/redis_client.h"
#include "ray/gcs/store_client/test/store_client_test_base.h"
+1
View File
@@ -17,6 +17,7 @@
#include <atomic>
#include <list>
#include <mutex>
#include "ray/gcs/callback.h"
#include "ray/gcs/tables.h"
+2 -2
View File
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "gtest/gtest.h"
#include "ray/gcs/redis_gcs_client.h"
#include "gtest/gtest.h"
#include "ray/common/ray_config.h"
#include "ray/common/test_util.h"
#include "ray/gcs/pb_util.h"
#include "ray/gcs/redis_gcs_client.h"
#include "ray/gcs/tables.h"
extern "C" {
@@ -13,6 +13,7 @@
// limitations under the License.
#include <memory>
#include "gtest/gtest.h"
#include "ray/gcs/redis_accessor.h"
#include "ray/gcs/redis_gcs_client.h"
@@ -15,14 +15,12 @@
#ifndef RAY_OBJECT_STORE_NOTIFICATION_MANAGER_H
#define RAY_OBJECT_STORE_NOTIFICATION_MANAGER_H
#include <boost/asio.hpp>
#include <iostream>
#include <memory>
#include <vector>
#include <boost/asio.hpp>
#include "absl/synchronization/mutex.h"
#include "ray/common/id.h"
#include "ray/common/status.h"
#include "ray/object_manager/format/object_manager_generated.h"
+3 -4
View File
@@ -14,15 +14,14 @@
#pragma once
#include <boost/asio.hpp>
#include <boost/asio/error.hpp>
#include <boost/bind.hpp>
#include <list>
#include <memory>
#include <mutex>
#include <vector>
#include <boost/asio.hpp>
#include <boost/asio/error.hpp>
#include <boost/bind.hpp>
#include "ray/common/id.h"
#include "ray/common/status.h"
#include "ray/object_manager/plasma/client.h"
+3 -4
View File
@@ -15,6 +15,9 @@
#pragma once
#include <algorithm>
#include <boost/asio.hpp>
#include <boost/asio/error.hpp>
#include <boost/bind.hpp>
#include <cstdint>
#include <deque>
#include <map>
@@ -23,10 +26,6 @@
#include <random>
#include <thread>
#include <boost/asio.hpp>
#include <boost/asio/error.hpp>
#include <boost/bind.hpp>
#include "absl/time/clock.h"
#include "ray/common/id.h"
#include "ray/common/ray_config.h"
+1 -2
View File
@@ -1,11 +1,10 @@
#include <gflags/gflags.h>
#include <signal.h>
#include <chrono>
#include <iostream>
#include <thread>
#include <gflags/gflags.h>
#include "ray/object_manager/plasma/store_runner.h"
#ifdef __linux__
+1 -2
View File
@@ -14,10 +14,9 @@
#pragma once
#include <list>
#include <boost/asio.hpp>
#include <boost/asio/error.hpp>
#include <list>
// clang-format off
#include "ray/raylet/node_manager.h"
+1 -3
View File
@@ -14,15 +14,13 @@
#pragma once
#include <boost/asio.hpp>
#include <functional>
#include <unordered_map>
#include <unordered_set>
#include <boost/asio.hpp>
#include "ray/common/id.h"
#include "ray/gcs/tables.h"
#include "ray/object_manager/object_directory.h"
namespace ray {
+4 -7
View File
@@ -12,21 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "ray/raylet/reconstruction_policy.h"
#include <boost/asio.hpp>
#include <list>
#include "absl/time/clock.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <boost/asio.hpp>
#include "ray/gcs/callback.h"
#include "ray/gcs/redis_accessor.h"
#include "ray/raylet/format/node_manager_generated.h"
#include "ray/raylet/reconstruction_policy.h"
#include "ray/object_manager/object_directory.h"
#include "ray/raylet/format/node_manager_generated.h"
namespace ray {
+3 -2
View File
@@ -15,9 +15,10 @@
#pragma once
#include <grpcpp/grpcpp.h>
#include <boost/asio.hpp>
#include "absl/synchronization/mutex.h"
#include <boost/asio.hpp>
#include "absl/synchronization/mutex.h"
#include "ray/common/grpc_util.h"
#include "ray/common/status.h"
+1
View File
@@ -15,6 +15,7 @@
#pragma once
#include <grpcpp/grpcpp.h>
#include <boost/asio.hpp>
#include "ray/common/grpc_util.h"
+1
View File
@@ -15,6 +15,7 @@
#pragma once
#include <grpcpp/grpcpp.h>
#include <boost/asio.hpp>
#include "ray/common/grpc_util.h"
+2 -2
View File
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <future>
#include "ray/stats/metric_exporter.h"
#include <future>
namespace ray {
namespace stats {
-1
View File
@@ -16,7 +16,6 @@
#include "absl/memory/memory.h"
#include "opencensus/stats/stats.h"
#include "opencensus/tags/tag_key.h"
#include "ray/stats/metric.h"
#include "ray/stats/metric_exporter_client.h"
#include "ray/util/logging.h"
+2 -2
View File
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <algorithm>
#include "ray/stats/metric_exporter_client.h"
#include <algorithm>
namespace ray {
namespace stats {
+3 -3
View File
@@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "ray/stats/metric_exporter_client.h"
#include <chrono>
#include <iostream>
@@ -21,10 +20,11 @@
#include <vector>
#include "absl/memory/memory.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "opencensus/stats/internal/delta_producer.h"
#include "opencensus/stats/internal/stats_exporter_impl.h"
#include "ray/stats/metric_exporter.h"
#include "ray/stats/metric_exporter_client.h"
#include "ray/stats/stats.h"
namespace ray {
-1
View File
@@ -19,7 +19,6 @@
#include <unordered_map>
#include "absl/synchronization/mutex.h"
#include "opencensus/stats/internal/delta_producer.h"
#include "opencensus/stats/stats.h"
#include "opencensus/tags/tag_key.h"
+3 -3
View File
@@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "ray/stats/stats.h"
#include <chrono>
#include <iostream>
@@ -21,7 +20,8 @@
#include <vector>
#include "absl/memory/memory.h"
#include "ray/stats/stats.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
namespace ray {
+1 -1
View File
@@ -542,8 +542,8 @@ MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP
#endif /* WIN32 */
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
#include <windows.h>
#define HAVE_MMAP 1
#define HAVE_MORECORE 0
#define LACKS_UNISTD_H
+2 -2
View File
@@ -13,9 +13,9 @@
*********************************************************************/
/*************************** HEADER FILES ***************************/
#include <stdlib.h>
#include <memory.h>
#include "ray/thirdparty/sha256.h"
#include <memory.h>
#include <stdlib.h>
/****************************** MACROS ******************************/
#define ROTLEFT(a,b) (((a) << (b)) | ((a) >> (32-(b))))
+1
View File
@@ -13,6 +13,7 @@
// limitations under the License.
#include "ray/util/io_service_pool.h"
#include "ray/util/logging.h"
namespace ray {
+2 -1
View File
@@ -12,10 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "ray/util/sample.h"
#include <vector>
#include "gtest/gtest.h"
#include "ray/util/sample.h"
namespace ray {
+1
View File
@@ -17,6 +17,7 @@
#include <deque>
#include <functional>
#include <unordered_map>
#include "absl/synchronization/mutex.h"
namespace ray {
+1
View File
@@ -13,6 +13,7 @@
// limitations under the License.
#include <signal.h>
#include <cstdlib>
#include <iostream>
+1 -2
View File
@@ -7,11 +7,10 @@
#endif
#include <algorithm>
#include <boost/asio/generic/stream_protocol.hpp>
#include <sstream>
#include <string>
#include <vector>
#include <boost/asio/generic/stream_protocol.hpp>
#ifndef _WIN32
#include <boost/asio/local/stream_protocol.hpp>
#endif