[doxygen] add test to ensure code snippet use \code command

This commit is contained in:
Denis Rouzaud 2017-12-19 16:31:53 -04:00
parent 5dc9b5869a
commit 8a5d53325c
2 changed files with 8 additions and 1 deletions

View File

@ -8,7 +8,7 @@ ADD_TEST(qgis_sipify ${CMAKE_SOURCE_DIR}/tests/code_layout/test_sipify.sh)
ADD_TEST(qgis_sip_include ${CMAKE_SOURCE_DIR}/tests/code_layout/test_sip_include.sh)
ADD_TEST(qgis_sip_uptodate ${CMAKE_SOURCE_DIR}/tests/code_layout/test_sipfiles_uptodate.sh)
ADD_TEST(qgis_doxygen_order ${CMAKE_SOURCE_DIR}/tests/code_layout/test_doxygen_order.sh)
ADD_TEST(qgis_doxygen_order ${CMAKE_SOURCE_DIR}/tests/code_layout/test_doxygen_layout.sh)
IF (WITH_APIDOC)
INCLUDE(UsePythonTest)

View File

@ -7,3 +7,10 @@ if [[ ! -z $output ]]; then
echo -e "\n\x1B[31m*** Docstring computation: \\\return(s) should be placed before \\\note and \\since\x1B[0m"
exit 1
fi
# code snippets command
output=$(unbuffer ag --noaffinity --file-search-regex '\.h$' --multiline '~~~\{\.\w+\}' ${TRAVIS_BUILD_DIR} | tee /dev/stderr)
if [[ ! -z $output ]]; then
echo -e "\n\x1B[31m*** Docstring computation: code snippets should use \\\code{.xx} rather than ~~~{.xx} \x1B[0m"
exit 1
fi