Skip to content

Commit

Permalink
(cmake_xmllint) include new args in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBurgh committed Apr 15, 2024
1 parent 9c11eef commit abe066d
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion ament_cmake_xmllint/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/ament/ament_lint>`_ 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
<https://github.com/ament/ament_cmake>`_ provides more information on testing
in CMake ament packages.

0 comments on commit abe066d

Please sign in to comment.