Skip to content

Commit

Permalink
ci: check include guard (#438)
Browse files Browse the repository at this point in the history
* ci: check include guard

* apply pre-commit

* Update .pre-commit-config.yaml

Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>

* fix: pre-commit

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

Co-authored-by: Kenji Miyake <kenji.miyake@tier4.jp>
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 25, 2022
1 parent b10dc10 commit 264909e
Show file tree
Hide file tree
Showing 33 changed files with 86 additions and 81 deletions.
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ repos:
- id: yamllint

- repo: https://github.com/tier4/pre-commit-hooks-ros
rev: v0.4.0
rev: v0.5.1
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <point_cloud_msg_wrapper/point_cloud_msg_wrapper.hpp>

Expand Down Expand Up @@ -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_
2 changes: 1 addition & 1 deletion common/polar_grid/src/polar_grid_display.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ private Q_SLOTS:

} // namespace rviz_plugins

#endif // POLAR_GRID_DISPLAY_HPP_
#endif // POLAR_GRID_DISPLAY_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -66,4 +66,4 @@ std::vector<autoware_auto_planning_msgs::msg::TrajectoryPoint> convertToTrajecto

} // namespace tier4_autoware_utils

#endif // TIER4_AUTOWARE_UTILS__TRAJECTORY__CONVERT_HPP_
#endif // TIER4_AUTOWARE_UTILS__TRAJECTORY__TMP_CONVERSION_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -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 <qt5/QtWidgets/QComboBox>
#include <qt5/QtWidgets/QDoubleSpinBox>
Expand Down Expand Up @@ -73,4 +73,4 @@ protected Q_SLOTS:

} // namespace rviz_plugins

#endif // AUTOWARE_STATE_PANEL_HPP_
#endif // SIMULATED_CLOCK_PANEL_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -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_
6 changes: 3 additions & 3 deletions localization/ndt/include/ndt/base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <pcl/io/io.h>
#include <pcl/io/pcd_io.h>
Expand Down Expand Up @@ -58,4 +58,4 @@ class NormalDistributionsTransformBase

#include "ndt/impl/base.hpp"

#endif
#endif // NDT__BASE_HPP_
6 changes: 3 additions & 3 deletions localization/ndt/include/ndt/impl/base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -22,4 +22,4 @@ NormalDistributionsTransformBase<PointSource, PointTarget>::NormalDistributionsT
{
}

#endif // NORMAL_DISTRIBUTIONS_TRANSFORM_BASE_HPP
#endif // NDT__IMPL__BASE_HPP_
6 changes: 3 additions & 3 deletions localization/ndt/include/ndt/impl/omp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -183,4 +183,4 @@ NormalDistributionsTransformOMP<PointSource, PointTarget>::getNeighborhoodSearch
return ndt_ptr_->getNeighborhoodSearchMethod();
}

#endif // NORMAL_DISTRIBUTIONS_TRANSFORM_OMP_HPP
#endif // NDT__IMPL__OMP_HPP_
6 changes: 3 additions & 3 deletions localization/ndt/include/ndt/impl/pcl_generic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -160,4 +160,4 @@ NormalDistributionsTransformPCLGeneric<PointSource, PointTarget>::getSearchMetho
return ndt_ptr_->getSearchMethodTarget();
}

#endif // NORMAL_DISTRIBUTIONS_TRANSFORM_PCL_GENERIC_HPP
#endif // NDT__IMPL__PCL_GENERIC_HPP_
6 changes: 3 additions & 3 deletions localization/ndt/include/ndt/impl/pcl_modified.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -160,4 +160,4 @@ NormalDistributionsTransformPCLModified<PointSource, PointTarget>::getSearchMeth
return ndt_ptr_->getSearchMethodTarget();
}

#endif // NORMAL_DISTRIBUTIONS_TRANSFORM_PCL_MODIFIED_HPP
#endif // NDT__IMPL__PCL_MODIFIED_HPP_
6 changes: 3 additions & 3 deletions localization/ndt/include/ndt/omp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -71,4 +71,4 @@ class NormalDistributionsTransformOMP

#include "ndt/impl/omp.hpp"

#endif
#endif // NDT__OMP_HPP_
6 changes: 3 additions & 3 deletions localization/ndt/include/ndt/pcl_generic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -64,4 +64,4 @@ class NormalDistributionsTransformPCLGeneric

#include "ndt/impl/pcl_generic.hpp"

#endif
#endif // NDT__PCL_GENERIC_HPP_
6 changes: 3 additions & 3 deletions localization/ndt/include/ndt/pcl_modified.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -65,4 +65,4 @@ class NormalDistributionsTransformPCLModified

#include "ndt/impl/pcl_modified.hpp"

#endif
#endif // NDT__PCL_MODIFIED_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -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 <algorithm>
#include <vector>
Expand Down Expand Up @@ -373,4 +373,4 @@ double pcl::NormalDistributionsTransformModified<PointSource, PointTarget>::comp
return a_t;
}

#endif // PCL_REGISTRATION_NDT_IMPL_MODIFIED_H_
#endif // NDT_PCL_MODIFIED__IMPL__NDT_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -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 <unsupported/Eigen/NonLinearOptimization>

Expand Down Expand Up @@ -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_
Original file line number Diff line number Diff line change
Expand Up @@ -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 <eigen3/Eigen/Core>

using Matrix6d = Eigen::Matrix<double, 6, 6>;
using RowMatrixXd = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;

#endif // NDT_SCAN_MATCHER__MATRIX_TYPE_HPP__
#endif // NDT_SCAN_MATCHER__MATRIX_TYPE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ struct Particle
int iteration;
};

#endif // NDT_SCAN_MATCHER__DEBUG_HPP_
#endif // NDT_SCAN_MATCHER__PARTICLE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -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 <rclcpp/rclcpp.hpp>

Expand Down Expand Up @@ -44,4 +44,4 @@ class VehicleVelocityConverter : public rclcpp::Node
std::array<double, 36> twist_covariance_;
};

#endif
#endif // VEHICLE_VELOCITY_CONVERTER__VEHICLE_VELOCITY_CONVERTER_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ class DistanceBasedCompareMapFilterComponent : public pointcloud_preprocessor::F
} // namespace compare_map_segmentation

// clang-format off
#endif // COMPARE_MAP_SEGMENTATION__DISTANCE_BASED_COMPARE_MAP_FILTER_NODELET_HPP_ // NOLINT
#endif // COMPARE_MAP_SEGMENTATION__DISTANCE_BASED_COMPARE_MAP_FILTER_NODELET_HPP_ // NOLINT
// clang-format on
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ class VoxelBasedApproximateCompareMapFilterComponent : public pointcloud_preproc
} // namespace compare_map_segmentation

// clang-format off
#endif // COMPARE_MAP_SEGMENTATION__VOXEL_BASED_APPROXIMATE_COMPARE_MAP_FILTER_NODELET_HPP_ // NOLINT
#endif // COMPARE_MAP_SEGMENTATION__VOXEL_BASED_APPROXIMATE_COMPARE_MAP_FILTER_NODELET_HPP_ // NOLINT
// clang-format on
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ class VoxelDistanceBasedCompareMapFilterComponent : public pointcloud_preprocess
} // namespace compare_map_segmentation

// clang-format off
#endif // COMPARE_MAP_SEGMENTATION__VOXEL_DISTANCE_BASED_COMPARE_MAP_FILTER_NODELET_HPP_ // NOLINT
#endif // COMPARE_MAP_SEGMENTATION__VOXEL_DISTANCE_BASED_COMPARE_MAP_FILTER_NODELET_HPP_ // NOLINT
// clang-format on
Original file line number Diff line number Diff line change
Expand Up @@ -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 <filters/filter_chain.hpp>
#include <grid_map_core/GridMap.hpp>
Expand Down Expand Up @@ -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_
Original file line number Diff line number Diff line change
Expand Up @@ -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 <class T>
void DisjointSetMakeSet(T * x)
Expand Down Expand Up @@ -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_
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cmath>
#include <string>
Expand All @@ -56,4 +56,4 @@ inline float Pixel2Pc(int in_pixel, float in_size, float out_range)
return out_range - (static_cast<float>(in_pixel) + 0.5f) * res;
}

#endif // MODULES_PERCEPTION_OBSTACLE_LIDAR_SEGMENTATION_CNNSEG_UTIL_H_
#endif // LIDAR_APOLLO_INSTANCE_SEGMENTATION__UTIL_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -112,4 +112,4 @@ class trtNet
};
} // namespace Tn

#endif // __TRT_NET_H_
#endif // TRTNET_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* SOFTWARE.
*/

#ifndef __TRT_UTILS_H_
#define __TRT_UTILS_H_
#ifndef UTILS_HPP_
#define UTILS_HPP_

#include <NvInferPlugin.h>
#include <cudnn.h>
Expand Down Expand Up @@ -131,4 +131,4 @@ void read(const char *& buffer, T & val)
}
} // namespace Tn

#endif
#endif // UTILS_HPP_
Loading

0 comments on commit 264909e

Please sign in to comment.