Skip to content

Commit

Permalink
Fix include order and relative paths for cpplint
Browse files Browse the repository at this point in the history
Relates to ament/ament_lint#324

Signed-off-by: Jacob Perron <[email protected]>
  • Loading branch information
jacobperron committed Jan 7, 2022
1 parent 8093648 commit 733f955
Show file tree
Hide file tree
Showing 17 changed files with 93 additions and 92 deletions.
2 changes: 1 addition & 1 deletion rclcpp/src/rclcpp/detail/resolve_parameter_overrides.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "./resolve_parameter_overrides.hpp"
#include "resolve_parameter_overrides.hpp"

#include <string>
#include <map>
Expand Down
3 changes: 2 additions & 1 deletion rclcpp/src/rclcpp/executors/multi_threaded_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ MultiThreadedExecutor::get_number_of_threads()
}

void
MultiThreadedExecutor::run(size_t)
MultiThreadedExecutor::run(size_t this_thread_number)
{
(void)this_thread_number;
while (rclcpp::ok(this->context_) && spinning.load()) {
rclcpp::AnyExecutable any_exec;
{
Expand Down
2 changes: 1 addition & 1 deletion rclcpp/src/rclcpp/signal_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "./signal_handler.hpp"
#include "signal_handler.hpp"

#include <atomic>
#include <csignal>
Expand Down
2 changes: 1 addition & 1 deletion rclcpp/test/rclcpp/test_intra_process_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ class SubscriptionIntraProcess : public SubscriptionIntraProcessBuffer<
#define SubscriptionIntraProcessBase mock::SubscriptionIntraProcessBase
#define SubscriptionIntraProcessBuffer mock::SubscriptionIntraProcessBuffer
#define SubscriptionIntraProcess mock::SubscriptionIntraProcess
#include "../src/rclcpp/intra_process_manager.cpp"
#include "../src/rclcpp/intra_process_manager.cpp" // NOLINT
#undef Publisher
#undef PublisherBase
#undef IntraProcessBuffer
Expand Down
22 changes: 11 additions & 11 deletions rclcpp_action/include/rclcpp_action/client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@
#ifndef RCLCPP_ACTION__CLIENT_HPP_
#define RCLCPP_ACTION__CLIENT_HPP_

#include <algorithm>
#include <chrono>
#include <functional>
#include <future>
#include <map>
#include <memory>
#include <mutex>
#include <string>
#include <utility>

#include <rclcpp/exceptions.hpp>
#include <rclcpp/macros.hpp>
#include <rclcpp/node_interfaces/node_base_interface.hpp>
Expand All @@ -24,19 +34,9 @@
#include <rclcpp/time.hpp>
#include <rclcpp/waitable.hpp>

#include <rosidl_runtime_c/action_type_support_struct.h>
#include "rosidl_runtime_c/action_type_support_struct.h"
#include <rosidl_typesupport_cpp/action_type_support.hpp>

#include <algorithm>
#include <chrono>
#include <functional>
#include <future>
#include <map>
#include <memory>
#include <mutex>
#include <string>
#include <utility>

#include "rclcpp_action/client_goal_handle.hpp"
#include "rclcpp_action/exceptions.hpp"
#include "rclcpp_action/types.hpp"
Expand Down
12 changes: 6 additions & 6 deletions rclcpp_action/include/rclcpp_action/client_goal_handle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
#ifndef RCLCPP_ACTION__CLIENT_GOAL_HANDLE_HPP_
#define RCLCPP_ACTION__CLIENT_GOAL_HANDLE_HPP_

#include <rcl_action/action_client.h>

#include <action_msgs/msg/goal_status.hpp>
#include <rclcpp/macros.hpp>
#include <rclcpp/time.hpp>

#include <functional>
#include <future>
#include <memory>
#include <mutex>

#include "rcl_action/action_client.h"

#include <action_msgs/msg/goal_status.hpp>
#include <rclcpp/macros.hpp>
#include <rclcpp/time.hpp>

#include "rclcpp_action/exceptions.hpp"
#include "rclcpp_action/types.hpp"
#include "rclcpp_action/visibility_control.hpp"
Expand Down
4 changes: 2 additions & 2 deletions rclcpp_action/include/rclcpp_action/create_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
#ifndef RCLCPP_ACTION__CREATE_CLIENT_HPP_
#define RCLCPP_ACTION__CREATE_CLIENT_HPP_

#include <rclcpp/node.hpp>

#include <memory>
#include <string>

#include <rclcpp/node.hpp>

#include "rclcpp_action/client.hpp"
#include "rclcpp_action/visibility_control.hpp"

Expand Down
8 changes: 4 additions & 4 deletions rclcpp_action/include/rclcpp_action/create_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
#ifndef RCLCPP_ACTION__CREATE_SERVER_HPP_
#define RCLCPP_ACTION__CREATE_SERVER_HPP_

#include <rcl_action/action_server.h>
#include <memory>
#include <string>

#include "rcl_action/action_server.h"

#include <rclcpp/node.hpp>
#include <rclcpp/node_interfaces/node_base_interface.hpp>
#include <rclcpp/node_interfaces/node_clock_interface.hpp>
#include <rclcpp/node_interfaces/node_logging_interface.hpp>
#include <rclcpp/node_interfaces/node_waitables_interface.hpp>

#include <memory>
#include <string>

#include "rclcpp_action/server.hpp"
#include "rclcpp_action/visibility_control.hpp"

Expand Down
16 changes: 8 additions & 8 deletions rclcpp_action/include/rclcpp_action/server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
#ifndef RCLCPP_ACTION__SERVER_HPP_
#define RCLCPP_ACTION__SERVER_HPP_

#include <rcl_action/action_server.h>
#include <rosidl_runtime_c/action_type_support_struct.h>
#include <rosidl_typesupport_cpp/action_type_support.hpp>
#include <rclcpp/node_interfaces/node_base_interface.hpp>
#include <rclcpp/node_interfaces/node_clock_interface.hpp>
#include <rclcpp/node_interfaces/node_logging_interface.hpp>
#include <rclcpp/waitable.hpp>

#include <functional>
#include <memory>
#include <mutex>
#include <string>
#include <unordered_map>
#include <utility>

#include "rcl_action/action_server.h"
#include "rosidl_runtime_c/action_type_support_struct.h"
#include <rosidl_typesupport_cpp/action_type_support.hpp>
#include <rclcpp/node_interfaces/node_base_interface.hpp>
#include <rclcpp/node_interfaces/node_clock_interface.hpp>
#include <rclcpp/node_interfaces/node_logging_interface.hpp>
#include <rclcpp/waitable.hpp>

#include "rclcpp_action/visibility_control.hpp"
#include "rclcpp_action/server_goal_handle.hpp"
#include "rclcpp_action/types.hpp"
Expand Down
10 changes: 5 additions & 5 deletions rclcpp_action/include/rclcpp_action/server_goal_handle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
#ifndef RCLCPP_ACTION__SERVER_GOAL_HANDLE_HPP_
#define RCLCPP_ACTION__SERVER_GOAL_HANDLE_HPP_

#include <rcl_action/types.h>
#include <rcl_action/goal_handle.h>

#include <action_msgs/msg/goal_status.hpp>

#include <functional>
#include <memory>
#include <mutex>

#include "rcl_action/types.h"
#include "rcl_action/goal_handle.h"

#include <action_msgs/msg/goal_status.hpp>

#include "rclcpp_action/visibility_control.hpp"
#include "rclcpp_action/types.hpp"

Expand Down
10 changes: 5 additions & 5 deletions rclcpp_action/include/rclcpp_action/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
#ifndef RCLCPP_ACTION__TYPES_HPP_
#define RCLCPP_ACTION__TYPES_HPP_

#include <rcl_action/types.h>

#include <action_msgs/msg/goal_status.hpp>
#include <action_msgs/msg/goal_info.hpp>

#include <climits>
#include <functional>
#include <string>

#include "rcl_action/types.h"

#include <action_msgs/msg/goal_status.hpp>
#include <action_msgs/msg/goal_info.hpp>

#include "rclcpp_action/visibility_control.hpp"

namespace rclcpp_action
Expand Down
10 changes: 5 additions & 5 deletions rclcpp_action/src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <rcl_action/action_client.h>
#include <rcl_action/wait.h>
#include <rclcpp/node_interfaces/node_base_interface.hpp>
#include <rclcpp/node_interfaces/node_logging_interface.hpp>

#include <algorithm>
#include <map>
#include <memory>
Expand All @@ -25,6 +20,11 @@
#include <tuple>
#include <utility>

#include "rcl_action/action_client.h"
#include "rcl_action/wait.h"
#include <rclcpp/node_interfaces/node_base_interface.hpp>
#include <rclcpp/node_interfaces/node_logging_interface.hpp>

#include "rclcpp_action/client.hpp"
#include "rclcpp_action/exceptions.hpp"

Expand Down
20 changes: 10 additions & 10 deletions rclcpp_action/src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <rcl_action/action_server.h>
#include <rcl_action/wait.h>

#include <rcpputils/scope_exit.hpp>

#include <action_msgs/msg/goal_status_array.hpp>
#include <action_msgs/srv/cancel_goal.hpp>
#include <rclcpp/exceptions.hpp>
#include <rclcpp_action/server.hpp>

#include <memory>
#include <mutex>
#include <string>
Expand All @@ -30,6 +20,16 @@
#include <utility>
#include <vector>

#include "rcl_action/action_server.h"
#include "rcl_action/wait.h"

#include <rcpputils/scope_exit.hpp>

#include <action_msgs/msg/goal_status_array.hpp>
#include <action_msgs/srv/cancel_goal.hpp>
#include <rclcpp/exceptions.hpp>
#include <rclcpp_action/server.hpp>

using rclcpp_action::ServerBase;
using rclcpp_action::GoalUUID;

Expand Down
8 changes: 4 additions & 4 deletions rclcpp_action/src/server_goal_handle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <rcl_action/action_server.h>
#include <rcl_action/goal_handle.h>
#include <memory>

#include "rcl_action/action_server.h"
#include "rcl_action/goal_handle.h"

#include <rclcpp_action/server_goal_handle.hpp>
#include <rclcpp/exceptions.hpp>

#include <memory>

namespace rclcpp_action
{
ServerGoalHandleBase::~ServerGoalHandleBase()
Expand Down
32 changes: 16 additions & 16 deletions rclcpp_action/test/test_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,23 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <gtest/gtest.h>
#include <future>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <thread>
#include <chrono>

#include "gtest/gtest.h"

#include <rcl/allocator.h>
#include <rcl/time.h>
#include <rcl/types.h>
#include "rcl/allocator.h"
#include "rcl/time.h"
#include "rcl/types.h"

#include <rcl_action/names.h>
#include <rcl_action/default_qos.h>
#include <rcl_action/wait.h>
#include "rcl_action/names.h"
#include "rcl_action/default_qos.h"
#include "rcl_action/wait.h"

#include <rclcpp/clock.hpp>
#include <rclcpp/exceptions.hpp>
Expand All @@ -33,21 +41,13 @@

#include <test_msgs/action/fibonacci.hpp>

#include <future>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <thread>
#include <chrono>

#include "rclcpp_action/exceptions.hpp"
#include "rclcpp_action/create_client.hpp"
#include "rclcpp_action/client.hpp"
#include "rclcpp_action/qos.hpp"
#include "rclcpp_action/types.hpp"

#include "./mocking_utils/patch.hpp"
#include "mocking_utils/patch.hpp"

using namespace std::chrono_literals;

Expand Down
12 changes: 6 additions & 6 deletions rclcpp_action/test/test_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <memory>
#include <vector>

#include "gtest/gtest.h"

#include <rclcpp/exceptions.hpp>
#include <rclcpp/node.hpp>
#include <rclcpp/rclcpp.hpp>
#include <rcpputils/scope_exit.hpp>
#include <test_msgs/action/fibonacci.hpp>

#include <gtest/gtest.h>

#include <memory>
#include <vector>

#include "rcl_action/action_server.h"
#include "rcl_action/wait.h"
#include "rclcpp_action/create_server.hpp"
#include "rclcpp_action/server.hpp"
#include "./mocking_utils/patch.hpp"
#include "mocking_utils/patch.hpp"

using Fibonacci = test_msgs::action::Fibonacci;
using CancelResponse = typename Fibonacci::Impl::CancelGoalService::Response;
Expand Down
12 changes: 6 additions & 6 deletions rclcpp_action/test/test_server_goal_handle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <memory>
#include <vector>

#include "gtest/gtest.h"

#include <rclcpp/exceptions.hpp>
#include <rclcpp/node.hpp>
#include <rclcpp/rclcpp.hpp>
#include <test_msgs/action/fibonacci.hpp>

#include <gtest/gtest.h>

#include <memory>
#include <vector>

#include "action_msgs/msg/goal_info.h"
#include "rclcpp_action/server_goal_handle.hpp"
#include "./mocking_utils/patch.hpp"
#include "mocking_utils/patch.hpp"

class FibonacciServerGoalHandle
: public rclcpp_action::ServerGoalHandle<test_msgs::action::Fibonacci>
Expand Down

0 comments on commit 733f955

Please sign in to comment.