linters
Running roslint
with catkin
roslint
with catkinBefore merging into the main repository roslint
is ran on all merge requests. Unless all errors are resolved the merge request will be rejected. To test if your changes would pass the roslint
test locally:
Add the following lines to your
CMakelists.txt
:
find_package(catkin REQUIRED COMPONENTS roslint ...)
roslint_python() # pep8 linting
roslint_cpp() # ROS wrapper of Google's cpplint
Your package.xml
should include roslint
as a build dependency:
<build_depend>roslint</build_depend>
Build target
roslint
:with
catkin_make
:catkin_make roslint_<package_name>
with
catkin_tools
:catkin build --no-deps <package_name> --make-args roslint_<package_name>
If build fail copy and execute the gray line that looks something like the following to see more detailed errors:
cd <package_source_directory>; catkin build --get-env <package_name> | catkin env -si /usr/bin/make roslint --jobserver-fds=6,7 -j; cd -

Running catkin_lint
catkin_lint
You should also make sure that the catkin_lint
tests pass; running it from the root of your catkin workspace you can run:
catkin_lint --strict --ignore CRITICAL_VAR_APPEND,LINK_DIRECTORY src/mas_domestic_robotics
See Also
Proposed linters:
Last updated
Was this helpful?