Skip to content

Enable cpplint and copyright linters - #112

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 #111

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. No behavior changes:

  • Header guards, lines over 100 characters (comments reflowed or moved above the member), include order, missing and duplicated includes.
  • Redundant virtual with override, explicit constructors, C-style casts, long long → int64_t, else braces, redundant blank lines, comment spacing.
  • using namespace replaced by using-declarations (navmap_ros cost values, Bonxai, octomap).
  • Missing copyright headers (MPPIOptimizer.cpp, FusionLocalizer.hpp/.cpp) and truncated Apache headers in four tests.
  • ukf_wrapper.cpp (adapted from robot_localization): NOLINT(readability/fn_size) on loadParams().

Excluded from the linters, keeping their original copyright and license:

  • The vendored Bonxai library (include/bonxai, src/bonxai): cpplint and copyright (it was already excluded from uncrustify).
  • Files derived from ROS / Nav2 (costmap_2d, cost_values, occ_grid_values, InflationFilter, map_io.cpp, ukf_wrapper, FindLZ4.cmake): copyright only, file by file.

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 (0 errors in all; copyright not run on humble), and colcon build / colcon test on rolling (all tests pass).

Remove the lines that disabled ament_cmake_cpplint and ament_cmake_copyright,
and fix what they report: header guards, line length, include order and
missing includes, redundant virtual, casts, C types, explicit constructors,
using-directives, braces, blank lines and missing copyright headers.
The vendored Bonxai library is excluded from both linters, and the files
derived from ROS / Nav2 from copyright, keeping their original licenses.
Humble's ament_copyright does not recognize the license when the header has
the EasyNav line, so copyright is skipped only there.

Fixes #111

Signed-off-by: Francisco Martín Rico <fmrico@gmail.com>
@fmrico
fmrico merged commit 37d7576 into rolling Oct 10, 2026
1 check passed
@fmrico
fmrico deleted the enable_cpplint branch October 10, 2026 07:28
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