File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-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+ if (DEFINED AMENT_LINT_AUTO_FILE_EXCLUDE)
19+ ament_pep257(EXCLUDE ${AMENT_LINT_AUTO_FILE_EXCLUDE} )
20+ else ()
21+ ament_pep257()
22+ endif ()
1923endif ()
Original file line number Diff line number Diff line change 1717#
1818# :param TESTNAME: the name of the test, default: "pep257"
1919# :type TESTNAME: string
20+ # :param EXCLUDE: an optional list of exclude files or directories for cmake pep257 check
21+ # :type EXCLUDE: list
2022# :param ARGN: the files or directories to check
2123# :type ARGN: list of strings
2224#
2325# @public
2426#
2527function (ament_pep257)
26- cmake_parse_arguments (ARG "" "TESTNAME" "" ${ARGN} )
28+ cmake_parse_arguments (ARG "" "TESTNAME" "EXCLUDE " ${ARGN} )
2729 if (NOT ARG_TESTNAME)
2830 set (ARG_TESTNAME "pep257" )
2931 endif ()
@@ -35,6 +37,9 @@ function(ament_pep257)
3537
3638 set (result_file "${AMENT_TEST_RESULTS_DIR} /${PROJECT_NAME} /${ARG_TESTNAME} .xunit.xml" )
3739 set (cmd "${ament_pep257_BIN} " "--xunit-file" "${result_file} " )
40+ if (ARG_EXCLUDE)
41+ list (APPEND cmd "--exclude" "${ARG_EXCLUDE} " )
42+ endif ()
3843 list (APPEND cmd ${ARG_UNPARSED_ARGUMENTS} )
3944
4045 file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR} /ament_pep257" )
You can’t perform that action at this time.
0 commit comments