File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 1515file (GLOB_RECURSE _python_files FOLLOW_SYMLINKS "*.py" )
1616if (_python_files)
1717 message (STATUS "Added test 'pep257' to check Python code against some of the docstring style conventions in PEP 257" )
18- ament_pep257()
18+
19+ # Get exclude paths for added targets
20+ set (_all_exclude "" )
21+ if (DEFINED ament_cmake_pep257_ADDITIONAL_EXCLUDE)
22+ list (APPEND _all_exclude ${ament_cmake_pep257_ADDITIONAL_EXCLUDE} )
23+ endif ()
24+
25+ if (DEFINED AMENT_LINT_AUTO_FILE_EXCLUDE)
26+ list (APPEND _all_exclude ${AMENT_LINT_AUTO_FILE_EXCLUDE} )
27+ endif ()
28+
29+ message (STATUS "Configured pep257 exclude dirs and/or files: ${_all_exclude} " )
30+ ament_pep257(EXCLUDE ${_all_exclude} )
1931endif ()
Original file line number Diff line number Diff line change 2323# @public
2424#
2525function (ament_pep257)
26- cmake_parse_arguments (ARG "" "TESTNAME" "" ${ARGN} )
26+ cmake_parse_arguments (ARG "" "EXCLUDE; TESTNAME" "" ${ARGN} )
2727 if (NOT ARG_TESTNAME)
2828 set (ARG_TESTNAME "pep257" )
2929 endif ()
@@ -35,6 +35,9 @@ function(ament_pep257)
3535
3636 set (result_file "${AMENT_TEST_RESULTS_DIR} /${PROJECT_NAME} /${ARG_TESTNAME} .xunit.xml" )
3737 set (cmd "${ament_pep257_BIN} " "--xunit-file" "${result_file} " )
38+ if (ARG_EXCLUDE)
39+ list (APPEND cmd "--exclude" "${ARG_EXCLUDE} " )
40+ endif ()
3841 list (APPEND cmd ${ARG_UNPARSED_ARGUMENTS} )
3942
4043 file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR} /ament_pep257" )
You can’t perform that action at this time.
0 commit comments