wiki
Getting startedGuidesFAQ
1.0.0
1.0.0
  • b-it-bots wiki
  • @home
    • Getting started
      • First steps
      • Setting up your development environment
        • Configuring your editor
        • Using ssh
      • Adding your first contribution
    • Tutorials
      • Architecture
    • Guides
      • git
        • Making good commits
        • Branching model
        • Adding git aliases to make your life easier
        • Creating a release
      • SSH
      • ROS
        • Creating a new package
          • Creating a new node
        • Creating a new message, service or action
        • Testing in ROS
        • Linting
      • Coding conventions
        • C++
        • Python
      • Toolkit
        • CLion
        • Atom configuration
        • Using vim
        • TMUX - Terminal Multiplexer
    • Resources
    • FAQ
      • git
  • @work
    • 2018-05-06-navigation-atwork
    • 2018-05-06-simulation_mapping
    • How to use the RealSense2 camera
    • Getting the classifier from a data set
Powered by GitBook
On this page
  • Running roslint with catkin
  • Running catkin_lint
  • See Also

Was this helpful?

  1. @home
  2. Guides
  3. ROS

Linting

PreviousTesting in ROSNextCoding conventions

Last updated 4 years ago

Was this helpful?

Running roslint with catkin

Before 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

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:

roslint
catkin_lint
C++
Python
ROS
2017-05-06-205659_900x152_scrot