Repository navigation
Enable cpplint and copyright linters - #112
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #111
Enables
ament_cmake_cpplintandament_cmake_copyrightin every package (theset(ament_cmake_*_FOUND TRUE)lines are removed), and fixes what they report. No behavior changes:virtualwithoverride,explicitconstructors, C-style casts,long long→int64_t,elsebraces, redundant blank lines, comment spacing.using namespacereplaced by using-declarations (navmap_roscost values,Bonxai,octomap).MPPIOptimizer.cpp,FusionLocalizer.hpp/.cpp) and truncated Apache headers in four tests.ukf_wrapper.cpp(adapted from robot_localization):NOLINT(readability/fn_size)onloadParams().Excluded from the linters, keeping their original copyright and license:
include/bonxai,src/bonxai): cpplint and copyright (it was already excluded from uncrustify).costmap_2d,cost_values,occ_grid_values,InflationFilter,map_io.cpp,ukf_wrapper,FindLZ4.cmake): copyright only, file by file.Humble's
ament_copyrightdoes 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 whenROS_DISTROishumble.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 teston rolling (all tests pass).