From abe066dd835318b5fd638b57f25987216265c22d Mon Sep 17 00:00:00 2001 From: Matthijs van der Burgh Date: Mon, 15 Apr 2024 14:17:06 +0200 Subject: [PATCH] (cmake_xmllint) include new args in docs --- ament_cmake_xmllint/doc/index.rst | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ament_cmake_xmllint/doc/index.rst b/ament_cmake_xmllint/doc/index.rst index 0fc19761..44d4be13 100644 --- a/ament_cmake_xmllint/doc/index.rst +++ b/ament_cmake_xmllint/doc/index.rst @@ -29,13 +29,30 @@ How to run the check from within a CMake ament package as part of the tests? find_package(ament_cmake REQUIRED) if(BUILD_TESTING) find_package(ament_cmake_xmllint REQUIRED) - ament_xmllint() + ament_xmllint( + # PATHS . + # EXCLUDE specific_file.xml + # EXTENSIONS xml urdf xacro + ) endif() When running multiple linters as part of the CMake tests the documentation of the package `ament_lint_auto `_ might contain some useful information. +When you want to customize the extensions of the files to be checked, while using `ament_lint_auto`, you can use the following code snippet: + +``CMakeLists.txt``: + +.. code:: cmake + + find_package(ament_cmake REQUIRED) + if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + set(ament_cmake_xmllint_EXTENSIONS "xml urdf xacro") + ament_lint_auto_find_test_dependencies() + endif() + The documentation of the package `ament_cmake_test `_ provides more information on testing in CMake ament packages.