Skip to content

Enable cpplint and copyright linters - #27

Merged
fmrico merged 1 commit into
rollingfrom
enable_cpplint
Oct 10, 2026
Merged

fmrico merged 1 commit into
rollingfrom
enable_cpplint

Conversation

@fmrico

@fmrico fmrico commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #26

Enables ament_cmake_cpplint and ament_cmake_copyright in every package (the set(ament_cmake_*_FOUND TRUE) lines are removed), and fixes what they report:

  • Header guards (NAVMAP_CORE__GEOMETRY_HPP_, NAVMAP_CORE__NAVMAP_HPP_, NAVMAP_RVIZ_PLUGIN__NAVMAPDISPLAY_HPP_).
  • Include order (C system, C++ system, other) and missing <utility> includes.
  • using namespace navmap; in tests replaced by using-declarations.
  • unsigned short → uint16_t, a C-style cast, explicit constructor, range-for spacing, comment spacing, else braces.
  • NavMap.hpp and test_navmap_assign.cpp still had the old GPL header: now the Apache 2.0 header of the rest of the project (the package license). The launch file navmap_to_occgrid.launch.py gets its header.
  • test_navmap_io.cpp: indentation of the last test and a duplicated remove(path).
  • test_conversions.cpp: lambda spacing that uncrustify reported in every distro.

Humble's ament_copyright does not recognize the Apache license when the header has the line This file is part of the project Easy Navigation, so copyright is skipped only when ROS_DISTRO is humble.

Checked with cpplint, copyright and uncrustify of humble, jazzy, kilted, lyrical and rolling (cpplint 0 and copyright 0 in all; uncrustify on humble keeps its pre-existing version differences), and colcon build / colcon test on rolling.

Remove the lines that disabled ament_cmake_cpplint and ament_cmake_copyright,
and fix what they report: header guards, include order, missing includes,
using-directives in tests, C types and casts, comment spacing, and two
remaining GPL headers moved to the Apache header of the rest of the project.
Humble's ament_copyright does not recognize the license when the header has
the EasyNav line, so copyright is skipped only there.

Fixes #26

Signed-off-by: Francisco Martín Rico <fmrico@gmail.com>
@fmrico
fmrico merged commit 7a58a60 into rolling Oct 10, 2026
1 check passed
@fmrico
fmrico deleted the enable_cpplint branch October 10, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable cpplint and copyright linters

1 participant