Skip to content

Commit 40fa2bd

Browse files
AlexReimannahcorde
andauthored
Add docu for AMENT_LINT_AUTO_EXCLUDE (#524)
Signed-off-by: Alexander Reimann <[email protected]> Signed-off-by: Alejandro Hernández Cordero <[email protected]> Co-authored-by: Alejandro Hernández Cordero <[email protected]>
1 parent 5b522e2 commit 40fa2bd

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

ament_lint_auto/doc/index.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,26 @@ The documentation of the package `ament_cmake_test
4444
<https://github.com/ament/ament_cmake>`_ provides more information on testing
4545
in CMake ament packages.
4646

47+
48+
How to exclude linter modules with ament_lint_auto?
49+
---------------------------------------------------
50+
51+
Linter modules can be excluded via the CMake list variable `AMENT_LINT_AUTO_EXCLUDE`.
52+
53+
As an example to exclude the `copyright` linter:
54+
55+
``CMakeLists.txt``:
56+
57+
.. code:: cmake
58+
59+
# this must happen before the invocation of ament_package()
60+
if(BUILD_TESTING)
61+
find_package(ament_lint_auto REQUIRED)
62+
list(APPEND AMENT_LINT_AUTO_EXCLUDE ament_cmake_copyright)
63+
ament_lint_auto_find_test_dependencies()
64+
endif()
65+
66+
4767
How to exclude files with ament_lint_auto?
4868
------------------------------------------
4969

0 commit comments

Comments
 (0)