Skip to content

Commit abe066d

Browse files
committed
(cmake_xmllint) include new args in docs
1 parent 9c11eef commit abe066d

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

ament_cmake_xmllint/doc/index.rst

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,30 @@ How to run the check from within a CMake ament package as part of the tests?
2929
find_package(ament_cmake REQUIRED)
3030
if(BUILD_TESTING)
3131
find_package(ament_cmake_xmllint REQUIRED)
32-
ament_xmllint()
32+
ament_xmllint(
33+
# PATHS .
34+
# EXCLUDE specific_file.xml
35+
# EXTENSIONS xml urdf xacro
36+
)
3337
endif()
3438
3539
When running multiple linters as part of the CMake tests the documentation of
3640
the package `ament_lint_auto <https://github.com/ament/ament_lint>`_ might
3741
contain some useful information.
3842

43+
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:
44+
45+
``CMakeLists.txt``:
46+
47+
.. code:: cmake
48+
49+
find_package(ament_cmake REQUIRED)
50+
if(BUILD_TESTING)
51+
find_package(ament_lint_auto REQUIRED)
52+
set(ament_cmake_xmllint_EXTENSIONS "xml urdf xacro")
53+
ament_lint_auto_find_test_dependencies()
54+
endif()
55+
3956
The documentation of the package `ament_cmake_test
4057
<https://github.com/ament/ament_cmake>`_ provides more information on testing
4158
in CMake ament packages.

0 commit comments

Comments
 (0)