How to use roslint with python corretly?

asked 2021-10-08 05:52:54 -0500

Eugen gravatar image

I try to use roslint for python based ros package in ros noetic (no c++ code in this package). I applied roslint in noetic to other ros packages (with c++ code only) with catkin_make, thus the behavior in these packages is the behavior I expect to see in this package as well.

Changes to package.xml:


Changes to CMakeLists.txt:

find_package(catkin REQUIRED COMPONENTS


Runing catkin_make roslint_my_python_package build the package but there is no such output as for c++ packages with roslint (like a list of error or Total errors found: 0).

Invoking roslint manually results in the error message make: *** No rule to make target 'roslint'. Stop..

  • Am I uning roslint wrong for python packages?
  • Do I have wrong expectations for the behavior of roslint for python packages?
  • (What output to expect in a correct configured ros package with withon code only with and without errors found by the linter?)
edit retag flag offensive close merge delete


Reading the issues for roslint I found this: It mentions you have to source the package before running roslint. Not sure if you have done this already.

osilva gravatar image osilva  ( 2021-10-08 11:31:15 -0500 )edit

Thanks for the hint, unfortunately that does not solve my problem. ros as well as the according dict.cworkspace are sourced correctly. catkin_make does work and catkin_make roslint_<my_package> does build the package and provides output about the successful build, but there is no output about the linting.

Eugen gravatar image Eugen  ( 2021-10-09 06:11:30 -0500 )edit