Skip to content

Commit

Permalink
[doxygen] add test to ensure code snippet use \code command
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Dec 20, 2017
1 parent 5dc9b58 commit 8a5d533
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/code_layout/CMakeLists.txt
Expand Up @@ -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)
Expand Down
Expand Up @@ -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

0 comments on commit 8a5d533

Please sign in to comment.