From d76de4e5f540285415e55f4a1d6b68adc29f7300 Mon Sep 17 00:00:00 2001 From: "Takagi, Isamu" Date: Thu, 24 Feb 2022 15:35:25 +0900 Subject: [PATCH 1/4] ci: check include guard --- .pre-commit-config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f3c030c55ed41..93c1e63cbb1f9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,10 +35,11 @@ repos: - id: yamllint - repo: https://github.com/tier4/pre-commit-hooks-ros - rev: v0.4.0 + rev: ros-include-guard hooks: - id: prettier-package-xml - id: sort-package-xml + - id: ros-include-guard - repo: https://github.com/shellcheck-py/shellcheck-py rev: v0.8.0.3 From 6e700a0136082dbaeb2f7131eb7ee62fba534315 Mon Sep 17 00:00:00 2001 From: Kenji Miyake Date: Thu, 24 Feb 2022 16:28:51 +0900 Subject: [PATCH 2/4] apply pre-commit --- common/autoware_auto_common/include/common/filesystem.hpp | 6 +++--- .../include/autoware_point_types/types.hpp | 6 +++--- .../tier4_autoware_utils/trajectory/tmp_conversion.hpp | 6 +++--- .../src/simulated_clock_panel.hpp | 6 +++--- .../include/trajectory_follower/interpolate.hpp | 2 +- localization/ndt/include/ndt/base.hpp | 6 +++--- localization/ndt/include/ndt/impl/base.hpp | 6 +++--- localization/ndt/include/ndt/impl/omp.hpp | 6 +++--- localization/ndt/include/ndt/impl/pcl_generic.hpp | 6 +++--- localization/ndt/include/ndt/impl/pcl_modified.hpp | 6 +++--- localization/ndt/include/ndt/omp.hpp | 6 +++--- localization/ndt/include/ndt/pcl_generic.hpp | 6 +++--- localization/ndt/include/ndt/pcl_modified.hpp | 6 +++--- .../ndt_pcl_modified/include/ndt_pcl_modified/impl/ndt.hpp | 6 +++--- .../ndt_pcl_modified/include/ndt_pcl_modified/ndt.hpp | 6 +++--- .../include/ndt_scan_matcher/matrix_type.hpp | 6 +++--- .../ndt_scan_matcher/include/ndt_scan_matcher/particle.hpp | 2 +- .../vehicle_velocity_converter.hpp | 6 +++--- .../elevation_map_loader/elevation_map_loader_node.hpp | 6 +++--- .../lidar_apollo_instance_segmentation/disjoint_set.hpp | 6 +++--- .../include/lidar_apollo_instance_segmentation/util.hpp | 6 +++--- .../lib/include/TrtNet.hpp | 6 +++--- .../lib/include/Utils.hpp | 6 +++--- perception/traffic_light_classifier/utils/trt_common.hpp | 6 +++--- .../analytical_jerk_constrained_smoother.hpp | 2 +- .../velocity_planning_utils.hpp | 2 +- .../include/fault_injection/diagnostic_storage.hpp | 6 +++--- .../include/fault_injection/fault_injection_node.hpp | 6 +++--- .../dummy_infrastructure/dummy_infrastructure_node.hpp | 6 +++--- 29 files changed, 79 insertions(+), 79 deletions(-) diff --git a/common/autoware_auto_common/include/common/filesystem.hpp b/common/autoware_auto_common/include/common/filesystem.hpp index 7fe16d8df8084..811e8a6e4a7bf 100644 --- a/common/autoware_auto_common/include/common/filesystem.hpp +++ b/common/autoware_auto_common/include/common/filesystem.hpp @@ -37,8 +37,8 @@ // #endif // //--------------------------------------------------------------------------------------- -#ifndef GHC_FILESYSTEM_H -#define GHC_FILESYSTEM_H +#ifndef COMMON__FILESYSTEM_HPP_ +#define COMMON__FILESYSTEM_HPP_ // #define BSD manifest constant only in // sys/param.h @@ -5555,4 +5555,4 @@ GHC_INLINE recursive_directory_iterator end(const recursive_directory_iterator&) #undef GHC_INLINE #undef GHC_EXPAND_IMPL -#endif // GHC_FILESYSTEM_H +#endif // COMMON__FILESYSTEM_HPP_ diff --git a/common/autoware_point_types/include/autoware_point_types/types.hpp b/common/autoware_point_types/include/autoware_point_types/types.hpp index 2c3d061930576..922327128082f 100644 --- a/common/autoware_point_types/include/autoware_point_types/types.hpp +++ b/common/autoware_point_types/include/autoware_point_types/types.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef AUTOWARE_POINT_TYPES__AUTOWARE_POINT_TYPES_HPP_ -#define AUTOWARE_POINT_TYPES__AUTOWARE_POINT_TYPES_HPP_ +#ifndef AUTOWARE_POINT_TYPES__TYPES_HPP_ +#define AUTOWARE_POINT_TYPES__TYPES_HPP_ #include @@ -77,4 +77,4 @@ using PointXYZIRADRTGenerator = std::tuple< } // namespace autoware_point_types -#endif // AUTOWARE_POINT_TYPES__AUTOWARE_POINT_TYPES_HPP_ +#endif // AUTOWARE_POINT_TYPES__TYPES_HPP_ diff --git a/common/tier4_autoware_utils/include/tier4_autoware_utils/trajectory/tmp_conversion.hpp b/common/tier4_autoware_utils/include/tier4_autoware_utils/trajectory/tmp_conversion.hpp index 51f865a6f8867..b699a579c3a63 100644 --- a/common/tier4_autoware_utils/include/tier4_autoware_utils/trajectory/tmp_conversion.hpp +++ b/common/tier4_autoware_utils/include/tier4_autoware_utils/trajectory/tmp_conversion.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef TIER4_AUTOWARE_UTILS__TRAJECTORY__CONVERT_HPP_ -#define TIER4_AUTOWARE_UTILS__TRAJECTORY__CONVERT_HPP_ +#ifndef TIER4_AUTOWARE_UTILS__TRAJECTORY__TMP_CONVERSION_HPP_ +#define TIER4_AUTOWARE_UTILS__TRAJECTORY__TMP_CONVERSION_HPP_ #include "tier4_autoware_utils/geometry/geometry.hpp" #include "tier4_autoware_utils/geometry/pose_deviation.hpp" @@ -66,4 +66,4 @@ std::vector convertToTrajecto } // namespace tier4_autoware_utils -#endif // TIER4_AUTOWARE_UTILS__TRAJECTORY__CONVERT_HPP_ +#endif // TIER4_AUTOWARE_UTILS__TRAJECTORY__TMP_CONVERSION_HPP_ diff --git a/common/tier4_simulated_clock_rviz_plugin/src/simulated_clock_panel.hpp b/common/tier4_simulated_clock_rviz_plugin/src/simulated_clock_panel.hpp index 137aafb30c88a..b2ac332107202 100644 --- a/common/tier4_simulated_clock_rviz_plugin/src/simulated_clock_panel.hpp +++ b/common/tier4_simulated_clock_rviz_plugin/src/simulated_clock_panel.hpp @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef AUTOWARE_STATE_PANEL_HPP_ -#define AUTOWARE_STATE_PANEL_HPP_ +#ifndef SIMULATED_CLOCK_PANEL_HPP_ +#define SIMULATED_CLOCK_PANEL_HPP_ #include #include @@ -73,4 +73,4 @@ protected Q_SLOTS: } // namespace rviz_plugins -#endif // AUTOWARE_STATE_PANEL_HPP_ +#endif // SIMULATED_CLOCK_PANEL_HPP_ diff --git a/control/trajectory_follower/include/trajectory_follower/interpolate.hpp b/control/trajectory_follower/include/trajectory_follower/interpolate.hpp index 99fc437d57f48..c01177cbe7581 100644 --- a/control/trajectory_follower/include/trajectory_follower/interpolate.hpp +++ b/control/trajectory_follower/include/trajectory_follower/interpolate.hpp @@ -56,4 +56,4 @@ TRAJECTORY_FOLLOWER_PUBLIC bool8_t linearInterpolate( } // namespace control } // namespace motion } // namespace autoware -#endif // TRAJECTORY_FOLLOWER__INTERPOLATE_HPP__ +#endif // TRAJECTORY_FOLLOWER__INTERPOLATE_HPP_ diff --git a/localization/ndt/include/ndt/base.hpp b/localization/ndt/include/ndt/base.hpp index 25cab0edca180..3f955ee98afc1 100644 --- a/localization/ndt/include/ndt/base.hpp +++ b/localization/ndt/include/ndt/base.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef NORMAL_DISTRIBUTIONS_TRANSFORM_BASE_H -#define NORMAL_DISTRIBUTIONS_TRANSFORM_BASE_H +#ifndef NDT__BASE_HPP_ +#define NDT__BASE_HPP_ #include #include @@ -58,4 +58,4 @@ class NormalDistributionsTransformBase #include "ndt/impl/base.hpp" -#endif +#endif // NDT__BASE_HPP_ diff --git a/localization/ndt/include/ndt/impl/base.hpp b/localization/ndt/include/ndt/impl/base.hpp index 897712bfcd038..1c2381d8842a6 100644 --- a/localization/ndt/include/ndt/impl/base.hpp +++ b/localization/ndt/include/ndt/impl/base.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef NORMAL_DISTRIBUTIONS_TRANSFORM_BASE_HPP -#define NORMAL_DISTRIBUTIONS_TRANSFORM_BASE_HPP +#ifndef NDT__IMPL__BASE_HPP_ +#define NDT__IMPL__BASE_HPP_ #include "ndt/base.hpp" @@ -22,4 +22,4 @@ NormalDistributionsTransformBase::NormalDistributionsT { } -#endif // NORMAL_DISTRIBUTIONS_TRANSFORM_BASE_HPP +#endif // NDT__IMPL__BASE_HPP_ diff --git a/localization/ndt/include/ndt/impl/omp.hpp b/localization/ndt/include/ndt/impl/omp.hpp index f00dbff7bea55..e0cd88a9574af 100644 --- a/localization/ndt/include/ndt/impl/omp.hpp +++ b/localization/ndt/include/ndt/impl/omp.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef NORMAL_DISTRIBUTIONS_TRANSFORM_OMP_HPP -#define NORMAL_DISTRIBUTIONS_TRANSFORM_OMP_HPP +#ifndef NDT__IMPL__OMP_HPP_ +#define NDT__IMPL__OMP_HPP_ #include "ndt/omp.hpp" @@ -183,4 +183,4 @@ NormalDistributionsTransformOMP::getNeighborhoodSearch return ndt_ptr_->getNeighborhoodSearchMethod(); } -#endif // NORMAL_DISTRIBUTIONS_TRANSFORM_OMP_HPP +#endif // NDT__IMPL__OMP_HPP_ diff --git a/localization/ndt/include/ndt/impl/pcl_generic.hpp b/localization/ndt/include/ndt/impl/pcl_generic.hpp index 8528859c8fa01..b817d2de35a5a 100644 --- a/localization/ndt/include/ndt/impl/pcl_generic.hpp +++ b/localization/ndt/include/ndt/impl/pcl_generic.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef NORMAL_DISTRIBUTIONS_TRANSFORM_PCL_GENERIC_HPP -#define NORMAL_DISTRIBUTIONS_TRANSFORM_PCL_GENERIC_HPP +#ifndef NDT__IMPL__PCL_GENERIC_HPP_ +#define NDT__IMPL__PCL_GENERIC_HPP_ #include "ndt/pcl_generic.hpp" @@ -160,4 +160,4 @@ NormalDistributionsTransformPCLGeneric::getSearchMetho return ndt_ptr_->getSearchMethodTarget(); } -#endif // NORMAL_DISTRIBUTIONS_TRANSFORM_PCL_GENERIC_HPP +#endif // NDT__IMPL__PCL_GENERIC_HPP_ diff --git a/localization/ndt/include/ndt/impl/pcl_modified.hpp b/localization/ndt/include/ndt/impl/pcl_modified.hpp index e0983ecd50516..1b208da132d3e 100644 --- a/localization/ndt/include/ndt/impl/pcl_modified.hpp +++ b/localization/ndt/include/ndt/impl/pcl_modified.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef NORMAL_DISTRIBUTIONS_TRANSFORM_PCL_MODIFIED_HPP -#define NORMAL_DISTRIBUTIONS_TRANSFORM_PCL_MODIFIED_HPP +#ifndef NDT__IMPL__PCL_MODIFIED_HPP_ +#define NDT__IMPL__PCL_MODIFIED_HPP_ #include "ndt/pcl_modified.hpp" @@ -160,4 +160,4 @@ NormalDistributionsTransformPCLModified::getSearchMeth return ndt_ptr_->getSearchMethodTarget(); } -#endif // NORMAL_DISTRIBUTIONS_TRANSFORM_PCL_MODIFIED_HPP +#endif // NDT__IMPL__PCL_MODIFIED_HPP_ diff --git a/localization/ndt/include/ndt/omp.hpp b/localization/ndt/include/ndt/omp.hpp index 20c68db1a32e1..803190d22d4ce 100644 --- a/localization/ndt/include/ndt/omp.hpp +++ b/localization/ndt/include/ndt/omp.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef NORMAL_DISTRIBUTIONS_TRANSFORM_OMP_H -#define NORMAL_DISTRIBUTIONS_TRANSFORM_OMP_H +#ifndef NDT__OMP_HPP_ +#define NDT__OMP_HPP_ #include "ndt/base.hpp" @@ -71,4 +71,4 @@ class NormalDistributionsTransformOMP #include "ndt/impl/omp.hpp" -#endif +#endif // NDT__OMP_HPP_ diff --git a/localization/ndt/include/ndt/pcl_generic.hpp b/localization/ndt/include/ndt/pcl_generic.hpp index b6d7500b75871..ae1255b2dece7 100644 --- a/localization/ndt/include/ndt/pcl_generic.hpp +++ b/localization/ndt/include/ndt/pcl_generic.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef NORMAL_DISTRIBUTIONS_TRANSFORM_PCL_GENERIC_H -#define NORMAL_DISTRIBUTIONS_TRANSFORM_PCL_GENERIC_H +#ifndef NDT__PCL_GENERIC_HPP_ +#define NDT__PCL_GENERIC_HPP_ #include "ndt/base.hpp" @@ -64,4 +64,4 @@ class NormalDistributionsTransformPCLGeneric #include "ndt/impl/pcl_generic.hpp" -#endif +#endif // NDT__PCL_GENERIC_HPP_ diff --git a/localization/ndt/include/ndt/pcl_modified.hpp b/localization/ndt/include/ndt/pcl_modified.hpp index f7f16f532d690..f9fa99bd782e3 100644 --- a/localization/ndt/include/ndt/pcl_modified.hpp +++ b/localization/ndt/include/ndt/pcl_modified.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef NORMAL_DISTRIBUTIONS_TRANSFORM_PCL_MODIFIED_H -#define NORMAL_DISTRIBUTIONS_TRANSFORM_PCL_MODIFIED_H +#ifndef NDT__PCL_MODIFIED_HPP_ +#define NDT__PCL_MODIFIED_HPP_ #include "ndt/base.hpp" @@ -65,4 +65,4 @@ class NormalDistributionsTransformPCLModified #include "ndt/impl/pcl_modified.hpp" -#endif +#endif // NDT__PCL_MODIFIED_HPP_ diff --git a/localization/ndt_pcl_modified/include/ndt_pcl_modified/impl/ndt.hpp b/localization/ndt_pcl_modified/include/ndt_pcl_modified/impl/ndt.hpp index 492bc57d84075..0feb97a19d839 100644 --- a/localization/ndt_pcl_modified/include/ndt_pcl_modified/impl/ndt.hpp +++ b/localization/ndt_pcl_modified/include/ndt_pcl_modified/impl/ndt.hpp @@ -51,8 +51,8 @@ * */ -#ifndef PCL_REGISTRATION_NDT_MODIFIED_IMPL_H_ -#define PCL_REGISTRATION_NDT_MODIFIED_IMPL_H_ +#ifndef NDT_PCL_MODIFIED__IMPL__NDT_HPP_ +#define NDT_PCL_MODIFIED__IMPL__NDT_HPP_ #include #include @@ -373,4 +373,4 @@ double pcl::NormalDistributionsTransformModified::comp return a_t; } -#endif // PCL_REGISTRATION_NDT_IMPL_MODIFIED_H_ +#endif // NDT_PCL_MODIFIED__IMPL__NDT_HPP_ diff --git a/localization/ndt_pcl_modified/include/ndt_pcl_modified/ndt.hpp b/localization/ndt_pcl_modified/include/ndt_pcl_modified/ndt.hpp index 73771b0b53e9c..81a2e219f2b81 100644 --- a/localization/ndt_pcl_modified/include/ndt_pcl_modified/ndt.hpp +++ b/localization/ndt_pcl_modified/include/ndt_pcl_modified/ndt.hpp @@ -51,8 +51,8 @@ * */ -#ifndef PCL_REGISTRATION_NDT_MODIFIED_H_ -#define PCL_REGISTRATION_NDT_MODIFIED_H_ +#ifndef NDT_PCL_MODIFIED__NDT_HPP_ +#define NDT_PCL_MODIFIED__NDT_HPP_ #include @@ -117,4 +117,4 @@ class NormalDistributionsTransformModified #include "ndt_pcl_modified/impl/ndt.hpp" -#endif // PCL_REGISTRATION_NDT_MODIFIED_H_ +#endif // NDT_PCL_MODIFIED__NDT_HPP_ diff --git a/localization/ndt_scan_matcher/include/ndt_scan_matcher/matrix_type.hpp b/localization/ndt_scan_matcher/include/ndt_scan_matcher/matrix_type.hpp index 61084bcf0d4cb..a83e8db02f521 100644 --- a/localization/ndt_scan_matcher/include/ndt_scan_matcher/matrix_type.hpp +++ b/localization/ndt_scan_matcher/include/ndt_scan_matcher/matrix_type.hpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef NDT_SCAN_MATCHER__MATRIX_TYPE_HPP__ -#define NDT_SCAN_MATCHER__MATRIX_TYPE_HPP__ +#ifndef NDT_SCAN_MATCHER__MATRIX_TYPE_HPP_ +#define NDT_SCAN_MATCHER__MATRIX_TYPE_HPP_ #include using Matrix6d = Eigen::Matrix; using RowMatrixXd = Eigen::Matrix; -#endif // NDT_SCAN_MATCHER__MATRIX_TYPE_HPP__ +#endif // NDT_SCAN_MATCHER__MATRIX_TYPE_HPP_ diff --git a/localization/ndt_scan_matcher/include/ndt_scan_matcher/particle.hpp b/localization/ndt_scan_matcher/include/ndt_scan_matcher/particle.hpp index f9dc42f76a3d6..740acf335099c 100644 --- a/localization/ndt_scan_matcher/include/ndt_scan_matcher/particle.hpp +++ b/localization/ndt_scan_matcher/include/ndt_scan_matcher/particle.hpp @@ -31,4 +31,4 @@ struct Particle int iteration; }; -#endif // NDT_SCAN_MATCHER__DEBUG_HPP_ +#endif // NDT_SCAN_MATCHER__PARTICLE_HPP_ diff --git a/localization/vehicle_velocity_converter/include/vehicle_velocity_converter/vehicle_velocity_converter.hpp b/localization/vehicle_velocity_converter/include/vehicle_velocity_converter/vehicle_velocity_converter.hpp index 2dfac343b0a86..043087a3afdf2 100644 --- a/localization/vehicle_velocity_converter/include/vehicle_velocity_converter/vehicle_velocity_converter.hpp +++ b/localization/vehicle_velocity_converter/include/vehicle_velocity_converter/vehicle_velocity_converter.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _VEHICLE_VELOCITY_CONVERTER_HPP_ -#define _VEHICLE_VELOCITY_CONVERTER_HPP_ +#ifndef VEHICLE_VELOCITY_CONVERTER__VEHICLE_VELOCITY_CONVERTER_HPP_ +#define VEHICLE_VELOCITY_CONVERTER__VEHICLE_VELOCITY_CONVERTER_HPP_ #include @@ -44,4 +44,4 @@ class VehicleVelocityConverter : public rclcpp::Node std::array twist_covariance_; }; -#endif +#endif // VEHICLE_VELOCITY_CONVERTER__VEHICLE_VELOCITY_CONVERTER_HPP_ diff --git a/perception/elevation_map_loader/include/elevation_map_loader/elevation_map_loader_node.hpp b/perception/elevation_map_loader/include/elevation_map_loader/elevation_map_loader_node.hpp index 81bfca84441ec..308e18ddce374 100644 --- a/perception/elevation_map_loader/include/elevation_map_loader/elevation_map_loader_node.hpp +++ b/perception/elevation_map_loader/include/elevation_map_loader/elevation_map_loader_node.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef MAP_LOADER__ELEVATION_MAP_LOADER_NODE_HPP_ -#define MAP_LOADER__ELEVATION_MAP_LOADER_NODE_HPP_ +#ifndef ELEVATION_MAP_LOADER__ELEVATION_MAP_LOADER_NODE_HPP_ +#define ELEVATION_MAP_LOADER__ELEVATION_MAP_LOADER_NODE_HPP_ #include #include @@ -113,4 +113,4 @@ class ElevationMapLoaderNode : public rclcpp::Node LaneFilter lane_filter_; }; -#endif // MAP_LOADER__ELEVATION_MAP_LOADER_NODE_HPP_ +#endif // ELEVATION_MAP_LOADER__ELEVATION_MAP_LOADER_NODE_HPP_ diff --git a/perception/lidar_apollo_instance_segmentation/include/lidar_apollo_instance_segmentation/disjoint_set.hpp b/perception/lidar_apollo_instance_segmentation/include/lidar_apollo_instance_segmentation/disjoint_set.hpp index fc3cc6b18a5ab..9c1c0405b36d1 100644 --- a/perception/lidar_apollo_instance_segmentation/include/lidar_apollo_instance_segmentation/disjoint_set.hpp +++ b/perception/lidar_apollo_instance_segmentation/include/lidar_apollo_instance_segmentation/disjoint_set.hpp @@ -14,8 +14,8 @@ * limitations under the License. *****************************************************************************/ -#ifndef MODULES_PERCEPTION_OBSTACLE_COMMON_DISJOINT_SET_H_ -#define MODULES_PERCEPTION_OBSTACLE_COMMON_DISJOINT_SET_H_ +#ifndef LIDAR_APOLLO_INSTANCE_SEGMENTATION__DISJOINT_SET_HPP_ +#define LIDAR_APOLLO_INSTANCE_SEGMENTATION__DISJOINT_SET_HPP_ template void DisjointSetMakeSet(T * x) @@ -72,4 +72,4 @@ void DisjointSetUnion(T * x, T * y) } } -#endif // MODULES_PERCEPTION_OBSTACLE_COMMON_DISJOINT_SET_H_ +#endif // LIDAR_APOLLO_INSTANCE_SEGMENTATION__DISJOINT_SET_HPP_ diff --git a/perception/lidar_apollo_instance_segmentation/include/lidar_apollo_instance_segmentation/util.hpp b/perception/lidar_apollo_instance_segmentation/include/lidar_apollo_instance_segmentation/util.hpp index 50318e633039b..9ae382bd51cec 100644 --- a/perception/lidar_apollo_instance_segmentation/include/lidar_apollo_instance_segmentation/util.hpp +++ b/perception/lidar_apollo_instance_segmentation/include/lidar_apollo_instance_segmentation/util.hpp @@ -28,8 +28,8 @@ * limitations under the License. *****************************************************************************/ -#ifndef MODULES_PERCEPTION_OBSTACLE_LIDAR_SEGMENTATION_CNNSEG_UTIL_H_ -#define MODULES_PERCEPTION_OBSTACLE_LIDAR_SEGMENTATION_CNNSEG_UTIL_H_ +#ifndef LIDAR_APOLLO_INSTANCE_SEGMENTATION__UTIL_HPP_ +#define LIDAR_APOLLO_INSTANCE_SEGMENTATION__UTIL_HPP_ #include #include @@ -56,4 +56,4 @@ inline float Pixel2Pc(int in_pixel, float in_size, float out_range) return out_range - (static_cast(in_pixel) + 0.5f) * res; } -#endif // MODULES_PERCEPTION_OBSTACLE_LIDAR_SEGMENTATION_CNNSEG_UTIL_H_ +#endif // LIDAR_APOLLO_INSTANCE_SEGMENTATION__UTIL_HPP_ diff --git a/perception/lidar_apollo_instance_segmentation/lib/include/TrtNet.hpp b/perception/lidar_apollo_instance_segmentation/lib/include/TrtNet.hpp index c4194a3f5c1e8..30d560135cb4f 100644 --- a/perception/lidar_apollo_instance_segmentation/lib/include/TrtNet.hpp +++ b/perception/lidar_apollo_instance_segmentation/lib/include/TrtNet.hpp @@ -21,8 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef __TRT_NET_H_ -#define __TRT_NET_H_ +#ifndef TRTNET_HPP_ +#define TRTNET_HPP_ #include "Utils.hpp" @@ -112,4 +112,4 @@ class trtNet }; } // namespace Tn -#endif // __TRT_NET_H_ +#endif // TRTNET_HPP_ diff --git a/perception/lidar_apollo_instance_segmentation/lib/include/Utils.hpp b/perception/lidar_apollo_instance_segmentation/lib/include/Utils.hpp index 8813206b965b3..93c90740934b9 100644 --- a/perception/lidar_apollo_instance_segmentation/lib/include/Utils.hpp +++ b/perception/lidar_apollo_instance_segmentation/lib/include/Utils.hpp @@ -22,8 +22,8 @@ * SOFTWARE. */ -#ifndef __TRT_UTILS_H_ -#define __TRT_UTILS_H_ +#ifndef UTILS_HPP_ +#define UTILS_HPP_ #include #include @@ -131,4 +131,4 @@ void read(const char *& buffer, T & val) } } // namespace Tn -#endif +#endif // UTILS_HPP_ diff --git a/perception/traffic_light_classifier/utils/trt_common.hpp b/perception/traffic_light_classifier/utils/trt_common.hpp index 269f7b11c6716..fb3f495fcdcf7 100644 --- a/perception/traffic_light_classifier/utils/trt_common.hpp +++ b/perception/traffic_light_classifier/utils/trt_common.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef PERCEPTION__TRAFFIC_LIGHT_RECOGNITION__TRAFFIC_LIGHT_CLASSIFIER__UTILS__TRT_COMMON_HPP_ -#define PERCEPTION__TRAFFIC_LIGHT_RECOGNITION__TRAFFIC_LIGHT_CLASSIFIER__UTILS__TRT_COMMON_HPP_ +#ifndef PERCEPTION__TRAFFIC_LIGHT_CLASSIFIER__UTILS__TRT_COMMON_HPP_ +#define PERCEPTION__TRAFFIC_LIGHT_CLASSIFIER__UTILS__TRT_COMMON_HPP_ #include #include @@ -143,4 +143,4 @@ class TrtCommon } // namespace Tn -#endif // PERCEPTION__TRAFFIC_LIGHT_RECOGNITION__TRAFFIC_LIGHT_CLASSIFIER__UTILS__TRT_COMMON_HPP_ +#endif // PERCEPTION__TRAFFIC_LIGHT_CLASSIFIER__UTILS__TRT_COMMON_HPP_ diff --git a/planning/motion_velocity_smoother/include/motion_velocity_smoother/smoother/analytical_jerk_constrained_smoother/analytical_jerk_constrained_smoother.hpp b/planning/motion_velocity_smoother/include/motion_velocity_smoother/smoother/analytical_jerk_constrained_smoother/analytical_jerk_constrained_smoother.hpp index a02d0508ac977..9188a428d32cc 100644 --- a/planning/motion_velocity_smoother/include/motion_velocity_smoother/smoother/analytical_jerk_constrained_smoother/analytical_jerk_constrained_smoother.hpp +++ b/planning/motion_velocity_smoother/include/motion_velocity_smoother/smoother/analytical_jerk_constrained_smoother/analytical_jerk_constrained_smoother.hpp @@ -109,4 +109,4 @@ class AnalyticalJerkConstrainedSmoother : public SmootherBase }; } // namespace motion_velocity_smoother -#endif +#endif // MOTION_VELOCITY_SMOOTHER__SMOOTHER__ANALYTICAL_JERK_CONSTRAINED_SMOOTHER__ANALYTICAL_JERK_CONSTRAINED_SMOOTHER_HPP_ diff --git a/planning/motion_velocity_smoother/include/motion_velocity_smoother/smoother/analytical_jerk_constrained_smoother/velocity_planning_utils.hpp b/planning/motion_velocity_smoother/include/motion_velocity_smoother/smoother/analytical_jerk_constrained_smoother/velocity_planning_utils.hpp index 3f1aea85d94df..58cbbd51348ba 100644 --- a/planning/motion_velocity_smoother/include/motion_velocity_smoother/smoother/analytical_jerk_constrained_smoother/velocity_planning_utils.hpp +++ b/planning/motion_velocity_smoother/include/motion_velocity_smoother/smoother/analytical_jerk_constrained_smoother/velocity_planning_utils.hpp @@ -54,4 +54,4 @@ double integ_a(double a0, double j0, double t); } // namespace analytical_velocity_planning_utils } // namespace motion_velocity_smoother -#endif +#endif // MOTION_VELOCITY_SMOOTHER__SMOOTHER__ANALYTICAL_JERK_CONSTRAINED_SMOOTHER__VELOCITY_PLANNING_UTILS_HPP_ diff --git a/simulator/fault_injection/include/fault_injection/diagnostic_storage.hpp b/simulator/fault_injection/include/fault_injection/diagnostic_storage.hpp index a8c71277b0a63..eb9e1ede3a099 100644 --- a/simulator/fault_injection/include/fault_injection/diagnostic_storage.hpp +++ b/simulator/fault_injection/include/fault_injection/diagnostic_storage.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FAULT_INJECTION__DIAGNOSTIC_STORAGE_HPP__ -#define FAULT_INJECTION__DIAGNOSTIC_STORAGE_HPP__ +#ifndef FAULT_INJECTION__DIAGNOSTIC_STORAGE_HPP_ +#define FAULT_INJECTION__DIAGNOSTIC_STORAGE_HPP_ #include @@ -67,4 +67,4 @@ class DiagnosticStorage } // namespace fault_injection -#endif // FAULT_INJECTION__DIAGNOSTIC_STORAGE_HPP__ +#endif // FAULT_INJECTION__DIAGNOSTIC_STORAGE_HPP_ diff --git a/simulator/fault_injection/include/fault_injection/fault_injection_node.hpp b/simulator/fault_injection/include/fault_injection/fault_injection_node.hpp index 510130b67e04f..0f578ff343a17 100644 --- a/simulator/fault_injection/include/fault_injection/fault_injection_node.hpp +++ b/simulator/fault_injection/include/fault_injection/fault_injection_node.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FAULT_INJECTION__FAULT_INJECTION_NODE_HPP__ -#define FAULT_INJECTION__FAULT_INJECTION_NODE_HPP__ +#ifndef FAULT_INJECTION__FAULT_INJECTION_NODE_HPP_ +#define FAULT_INJECTION__FAULT_INJECTION_NODE_HPP_ #include "fault_injection/diagnostic_storage.hpp" @@ -59,4 +59,4 @@ class FaultInjectionNode : public rclcpp::Node } // namespace fault_injection -#endif // FAULT_INJECTION__FAULT_INJECTION_NODE_HPP__ +#endif // FAULT_INJECTION__FAULT_INJECTION_NODE_HPP_ diff --git a/system/dummy_infrastructure/include/dummy_infrastructure/dummy_infrastructure_node.hpp b/system/dummy_infrastructure/include/dummy_infrastructure/dummy_infrastructure_node.hpp index 09309541fb964..69ec02134d1ab 100644 --- a/system/dummy_infrastructure/include/dummy_infrastructure/dummy_infrastructure_node.hpp +++ b/system/dummy_infrastructure/include/dummy_infrastructure/dummy_infrastructure_node.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef DUMMY_INFRASTRUCTURE__DUMMY_INFRASTRUCTURE_NODE_HPP__ -#define DUMMY_INFRASTRUCTURE__DUMMY_INFRASTRUCTURE_NODE_HPP__ +#ifndef DUMMY_INFRASTRUCTURE__DUMMY_INFRASTRUCTURE_NODE_HPP_ +#define DUMMY_INFRASTRUCTURE__DUMMY_INFRASTRUCTURE_NODE_HPP_ #include @@ -76,4 +76,4 @@ class DummyInfrastructureNode : public rclcpp::Node } // namespace dummy_infrastructure -#endif // DUMMY_INFRASTRUCTURE__DUMMY_INFRASTRUCTURE_NODE_HPP__ +#endif // DUMMY_INFRASTRUCTURE__DUMMY_INFRASTRUCTURE_NODE_HPP_ From 74b3e5406204c62a3fd0a1e547b381ddfaf1e6ba Mon Sep 17 00:00:00 2001 From: "Takagi, Isamu" <43976882+isamu-takagi@users.noreply.github.com> Date: Thu, 24 Feb 2022 19:43:25 +0900 Subject: [PATCH 3/4] Update .pre-commit-config.yaml Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 93c1e63cbb1f9..652a006328326 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,7 +35,7 @@ repos: - id: yamllint - repo: https://github.com/tier4/pre-commit-hooks-ros - rev: ros-include-guard + rev: v0.5.0 hooks: - id: prettier-package-xml - id: sort-package-xml From a1294c0f8241a4f07a30c18f85f6e6b507ffa3e2 Mon Sep 17 00:00:00 2001 From: "Takagi, Isamu" Date: Fri, 25 Feb 2022 13:59:45 +0900 Subject: [PATCH 4/4] fix: pre-commit Signed-off-by: Takagi, Isamu --- .pre-commit-config.yaml | 2 +- .../analytical_jerk_constrained_smoother.hpp | 4 +++- .../velocity_planning_utils.hpp | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 652a006328326..0663aaf1d2b45 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,7 +35,7 @@ repos: - id: yamllint - repo: https://github.com/tier4/pre-commit-hooks-ros - rev: v0.5.0 + rev: v0.5.1 hooks: - id: prettier-package-xml - id: sort-package-xml diff --git a/planning/motion_velocity_smoother/include/motion_velocity_smoother/smoother/analytical_jerk_constrained_smoother/analytical_jerk_constrained_smoother.hpp b/planning/motion_velocity_smoother/include/motion_velocity_smoother/smoother/analytical_jerk_constrained_smoother/analytical_jerk_constrained_smoother.hpp index 9188a428d32cc..cf583639bfc6c 100644 --- a/planning/motion_velocity_smoother/include/motion_velocity_smoother/smoother/analytical_jerk_constrained_smoother/analytical_jerk_constrained_smoother.hpp +++ b/planning/motion_velocity_smoother/include/motion_velocity_smoother/smoother/analytical_jerk_constrained_smoother/analytical_jerk_constrained_smoother.hpp @@ -109,4 +109,6 @@ class AnalyticalJerkConstrainedSmoother : public SmootherBase }; } // namespace motion_velocity_smoother -#endif // MOTION_VELOCITY_SMOOTHER__SMOOTHER__ANALYTICAL_JERK_CONSTRAINED_SMOOTHER__ANALYTICAL_JERK_CONSTRAINED_SMOOTHER_HPP_ +// clang-format off +#endif // MOTION_VELOCITY_SMOOTHER__SMOOTHER__ANALYTICAL_JERK_CONSTRAINED_SMOOTHER__ANALYTICAL_JERK_CONSTRAINED_SMOOTHER_HPP_ // NOLINT +// clang-format on diff --git a/planning/motion_velocity_smoother/include/motion_velocity_smoother/smoother/analytical_jerk_constrained_smoother/velocity_planning_utils.hpp b/planning/motion_velocity_smoother/include/motion_velocity_smoother/smoother/analytical_jerk_constrained_smoother/velocity_planning_utils.hpp index 58cbbd51348ba..cea252f991f75 100644 --- a/planning/motion_velocity_smoother/include/motion_velocity_smoother/smoother/analytical_jerk_constrained_smoother/velocity_planning_utils.hpp +++ b/planning/motion_velocity_smoother/include/motion_velocity_smoother/smoother/analytical_jerk_constrained_smoother/velocity_planning_utils.hpp @@ -54,4 +54,6 @@ double integ_a(double a0, double j0, double t); } // namespace analytical_velocity_planning_utils } // namespace motion_velocity_smoother -#endif // MOTION_VELOCITY_SMOOTHER__SMOOTHER__ANALYTICAL_JERK_CONSTRAINED_SMOOTHER__VELOCITY_PLANNING_UTILS_HPP_ +// clang-format off +#endif // MOTION_VELOCITY_SMOOTHER__SMOOTHER__ANALYTICAL_JERK_CONSTRAINED_SMOOTHER__VELOCITY_PLANNING_UTILS_HPP_ // NOLINT +// clang-format on