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.