提交 447cdad7 编写于 作者: S siyangy 提交者: Dong Li

Add missing cpplint to common

上级 43197579
load("//tools:cpplint.bzl", "cpplint")
package(default_visibility = ["//visibility:public"])
cc_library(
......@@ -42,3 +44,5 @@ cc_library(
"@ros//:ros_common",
],
)
cpplint()
load("//tools:cpplint.bzl", "cpplint")
package(default_visibility = ["//visibility:public"])
cc_library(
......@@ -86,3 +88,5 @@ cc_library(
"@glog//:glog",
],
)
cpplint()
......@@ -28,9 +28,10 @@
#include <string>
#include <type_traits>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/message.h>
#include "glog/logging.h"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/message.h"
#include "modules/common/adapters/adapter_gflags.h"
#include "modules/common/proto/header.pb.h"
#include "modules/common/time/time.h"
......@@ -111,7 +112,9 @@ class Adapter {
/**
* @brief returns the topic name that this adapter listens to.
*/
const std::string &topic_name() const { return topic_name_; }
const std::string &topic_name() const {
return topic_name_;
}
/**
* @brief reads the proto message from the file, and push it into
......@@ -201,14 +204,18 @@ class Adapter {
* queue. The caller can use it to iterate over the observed data
* from the head. The API also supports range based for loop.
*/
Iterator begin() const { return observed_queue_.begin(); }
Iterator begin() const {
return observed_queue_.begin();
}
/**
* @brief returns an iterator representing the tail of the observing
* queue. The caller can use it to iterate over the observed data
* from the head. The API also supports range based for loop.
*/
Iterator end() const { return observed_queue_.end(); }
Iterator end() const {
return observed_queue_.end();
}
/**
* @brief registers the provided callback function to the adapter,
......@@ -216,7 +223,9 @@ class Adapter {
* message hits the adapter.
* @param callback the callback with signature void(const D &).
*/
void SetCallback(Callback callback) { receive_callback_ = callback; }
void SetCallback(Callback callback) {
receive_callback_ = callback;
}
/**
* @brief fills the fields module_name, timestamp_sec and
......
......@@ -23,7 +23,9 @@
#include <functional>
#include <memory>
#include <string>
#include <type_traits>
#include <vector>
#include "modules/common/adapters/adapter.h"
#include "modules/common/adapters/message_adapters.h"
......
......@@ -39,5 +39,4 @@
} \
DISALLOW_IMPLICIT_CONSTRUCTORS(classname) \
private:
#endif // MODULES_COMMON_MACRO_H_
load("//tools:cpplint.bzl", "cpplint")
package(default_visibility = ["//visibility:public"])
cc_library(
......@@ -21,3 +23,5 @@ cc_test(
"@gtest//:main",
],
)
cpplint()
......@@ -186,7 +186,7 @@ class Clock {
* @brief constructs the \class Clock instance
* @param is_system_clock See UseSystemClock.
*/
Clock(bool is_system_clock)
explicit Clock(bool is_system_clock)
: is_system_clock_(is_system_clock), mock_now_(Timestamp()) {}
/**
......
......@@ -53,7 +53,6 @@ TEST(TimeTest, TimestampFromAndToDouble) {
EXPECT_FLOAT_EQ(1234567.889923456, ToSecond(timestamp));
}
TEST(TimeTest, MockTime) {
EXPECT_TRUE(Clock::IsSystemClock());
Clock::UseSystemClock(false);
......@@ -65,6 +64,6 @@ TEST(TimeTest, MockTime) {
EXPECT_EQ(123, AsInt64<micros>(Clock::Now()));
}
} // namespace time
} // namespace common
} // namespace apollo
} // namespace time
} // namespace common
} // namespace apollo
load("//tools:cpplint.bzl", "cpplint")
package(default_visibility = ["//visibility:public"])
cc_library(
......@@ -81,3 +83,5 @@ cc_test(
"@gtest//:main",
],
)
cpplint()
......@@ -24,6 +24,8 @@
#include <map>
#include <memory>
#include <utility>
#include "modules/common/log.h"
#include "modules/common/macro.h"
......
......@@ -29,8 +29,8 @@
#include <fstream>
#include <string>
#include <google/protobuf/io/zero_copy_stream_impl.h>
#include <google/protobuf/text_format.h>
#include "google/protobuf/io/zero_copy_stream_impl.h"
#include "google/protobuf/text_format.h"
#include "modules/common/log.h"
#include "modules/common/util/util.h"
......
......@@ -77,6 +77,6 @@ TEST_F(FileTest, RemoveAllFiles) {
EXPECT_FALSE(GetProtoFromASCIIFile(path2, &message));
}
} // namespace file
} // namespace util
} // namespace common
} // namespace apollo
......@@ -44,7 +44,8 @@ class StringTokenizer {
* @param s String to be split
* @param delims Delimiters where the string should be split
*/
StringTokenizer(const std::string& s, const std::string& delims = " ");
explicit StringTokenizer(const std::string& s,
const std::string& delims = " ");
/**
* Destructor
......
load("//tools:cpplint.bzl", "cpplint")
package(default_visibility = ["//visibility:public"])
cc_binary(
......@@ -17,3 +19,5 @@ cc_binary(
"@ros//:ros_common",
],
)
cpplint()
......@@ -17,6 +17,7 @@
#include "modules/hmi/ros_node/ros_node_service.h"
#include <chrono>
#include <memory>
#include <thread>
#include "gflags/gflags.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册