m12watanabe1a 2022-11-30
fix cpplint warnings
@b9853a10ea167d1d2ac1fece760e75032b006301
.vscode/cspell.json
--- .vscode/cspell.json
+++ .vscode/cspell.json
@@ -2,18 +2,19 @@
   "version": "0.2",
   "language": "en",
   "words": [
-    "rclcpp",
-    "m12watanabe1a",
-    "rosdistro",
-    "distro",
-    "colcon",
-    "roboteq",
-    "rviz",
-    "xacro",
-    "urdf",
     "bringup",
+    "colcon",
+    "distro",
+    "dpad",
     "dualsense",
     "dualshock",
-    "teleop"
+    "m12watanabe1a",
+    "rclcpp",
+    "roboteq",
+    "rosdistro",
+    "rviz",
+    "teleop",
+    "urdf",
+    "xacro",
   ]
 }
(파일 끝에 줄바꿈 문자 없음)
 
CPPLINT.cfg (added)
+++ CPPLINT.cfg
@@ -0,0 +1,14 @@
+# Modified from https://github.com/ament/ament_lint/blob/ebd524bb9973d5ec1dc48a670ce54f958a5a0243/ament_cpplint/ament_cpplint/main.py#L64-L120
+set noparent
+linelength=100
+includeorder=standardcfirst
+filter=-build/c++11               # we do allow C++11
+filter=-build/namespaces_literals # we allow using namespace for literals
+filter=-runtime/references        # we consider passing non-const references to be ok
+filter=-whitespace/braces         # we wrap open curly braces for namespaces, classes and functions
+filter=-whitespace/indent         # we don't indent keywords like public, protected and private with one space
+filter=-whitespace/parens         # we allow closing parenthesis to be on the next line
+filter=-whitespace/semicolon      # we allow the developer to decide about whitespace after a semicolon
+filter=-build/header_guard        # we automatically fix the names of header guards using pre-commit
+filter=-build/include_order       # we use the custom include order
+filter=-build/include_subdir      # we allow the style of "foo.hpp"
p9n_interface/include/p9n_interface/p9n_interface.hpp
--- p9n_interface/include/p9n_interface/p9n_interface.hpp
+++ p9n_interface/include/p9n_interface/p9n_interface.hpp
@@ -14,6 +14,9 @@
 
 #pragma once
 
+#include <string>
+#include <memory>
+
 #include "p9n_interface/hw_types.hpp"
 
 #include "p9n_interface/ps3_dualshock3.hpp"
@@ -49,7 +52,6 @@
 
 typedef struct
 {
-
   size_t d_pad_x;
   size_t d_pad_y;
   size_t stick_lx;
@@ -67,6 +69,9 @@
 
 class PlayStationInterface
 {
+public:
+  using UniquePtr = std::unique_ptr<PlayStationInterface>;
+
 private:
   HW_TYPE HW_TYPE_;
   sensor_msgs::msg::Joy::ConstSharedPtr joy_;
 
setup.cfg (added)
+++ setup.cfg
@@ -0,0 +1,15 @@
+[flake8]
+# Modified from https://github.com/ament/ament_lint/blob/ebd524bb9973d5ec1dc48a670ce54f958a5a0243/ament_flake8/ament_flake8/configuration/ament_flake8.ini
+extend-ignore = B902,C816,D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404,I202,CNL100,E203,E501,Q000
+import-order-style = pep8
+max-line-length = 100
+show-source = true
+statistics = true
+
+[isort]
+profile=black
+line_length=100
+force_sort_within_sections=true
+force_single_line=true
+reverse_relative=true
+known_third_party=launch
Add a comment
List