Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc tidying for ROS Noetic. #79

Merged
merged 1 commit into from
Mar 16, 2020
Merged

Misc tidying for ROS Noetic. #79

merged 1 commit into from
Mar 16, 2020

Conversation

mikepurvis
Copy link
Member

  • Invoke wrappers with python -m instead of as scripts.
  • Drop logic not needed with CATKIN_ENV used.
  • Drop unneeded install of the cmake extra.
  • Print output as well as capturing in test wrapper.

FYI @sloretz

- Invoke wrappers with python -m instead of as scripts.
- Drop logic not needed with CATKIN_ENV used.
- Drop unneeded install of the cmake extra.
- Print output as well as capturing in test wrapper.
@@ -62,14 +62,14 @@ function(roslint_python)
file(GLOB_RECURSE ARGN *.py)
endif()
if (NOT DEFINED ROSLINT_PYTHON_CMD)
set(ROSLINT_PYTHON_CMD ${ROSLINT_SCRIPTS_DIR}/pycodestyle)
set(ROSLINT_PYTHON_CMD ${PYTHON_EXECUTABLE} -m roslint.pycodestyle_wrapper)
Copy link
Member Author

@mikepurvis mikepurvis Mar 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cleans up the story for using roslint from the develspace on a Py3-only system.

endif()
roslint_custom("${ROSLINT_PYTHON_CMD}" "${ROSLINT_PYTHON_OPTS}" ${ARGN})
endfunction()

# Run roslint for this package as a test.
function(roslint_add_test)
catkin_run_tests_target("roslint" "package" "roslint-${PROJECT_NAME}.xml"
COMMAND ${ROSLINT_SCRIPTS_DIR}/test_wrapper ${CATKIN_TEST_RESULTS_DIR}/${PROJECT_NAME}/roslint-${PROJECT_NAME}.xml make roslint_${PROJECT_NAME}
COMMAND "${ROSLINT_SCRIPTS_DIR}/test_wrapper ${CATKIN_TEST_RESULTS_DIR}/${PROJECT_NAME}/roslint-${PROJECT_NAME}.xml make roslint_${PROJECT_NAME}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These quotes are the fix to the issue that was messing with my testing before; I think there must have been a change in CMake behaviour triggered by #77.

@mikepurvis mikepurvis merged commit 27cc3a4 into master Mar 16, 2020
@mikepurvis mikepurvis deleted the fixes-for-noetic branch March 16, 2020 15:53
@DLu
Copy link

DLu commented Jul 2, 2020

Did this change how to invoke the linter from the command line? I used to always run rosrun roslint cpplint but now that executable is not found.

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.

None yet

2 participants