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

lint generated launch files #181

Merged
merged 1 commit into from
Oct 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions composition/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ if(BUILD_TESTING)
"test_ament_index/$<CONFIG>/share/ament_index/resource_index/node_plugin/${PROJECT_NAME}"
CONTENT "${node_plugins}")

set(generated_python_files)
macro(tests)
set(MANUAL_COMPOSITION_EXECUTABLE $<TARGET_FILE:manual_composition>)
set(LINKTIME_COMPOSITION_EXECUTABLE $<TARGET_FILE:linktime_composition>)
Expand Down Expand Up @@ -182,6 +183,9 @@ if(BUILD_TESTING)
APPEND_ENV AMENT_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}/test_ament_index/$<CONFIG>
APPEND_LIBRARY_DIRS "${append_library_dirs}"
TIMEOUT 90)
list(
APPEND generated_python_files
"${CMAKE_CURRENT_BINARY_DIR}/test_composition${target_suffix}_$<CONFIG>.py")
endmacro()

set(append_library_dirs "${CMAKE_CURRENT_BINARY_DIR}")
Expand All @@ -190,6 +194,13 @@ if(BUILD_TESTING)
endif()

call_for_each_rmw_implementation(tests)

find_package(ament_cmake_flake8 REQUIRED)
Copy link
Member

Choose a reason for hiding this comment

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

is this necessary ? this package already find_package the ament_lint_auto dependencies.
If we want the ability to make some of them REQUIRED we could implement something similar to ament/ament_cmake#93 in ament_lint_auto and just pass ament_cmake_flake8 as a required dependency

Copy link
Member Author

Choose a reason for hiding this comment

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

I am just applying "find what you need". Since the code is using a CMake function of that package it is finding it explicitly.

ament_flake8(
TESTNAME "flake8_generated_launch"
# the generated code might contain longer lines for templated types
MAX_LINE_LENGTH 999
${generated_python_files})
endif()

ament_package()