Skip to content
Permalink
Browse files

add a test to check that returns are placed before since and note in …

…Doxygen
  • Loading branch information
3nids committed Dec 16, 2017
1 parent 92751d4 commit e6f657cf818f4f6cc27b8893d0a9368ace4b82aa
Showing with 11 additions and 0 deletions.
  1. +2 −0 tests/code_layout/CMakeLists.txt
  2. +9 −0 tests/code_layout/test_doxygen_order.sh
@@ -8,6 +8,8 @@ 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)

IF (WITH_APIDOC)
INCLUDE(UsePythonTest)
ADD_PYTHON_TEST(PyQgsDocCoverage ${CMAKE_SOURCE_DIR}/tests/code_layout/test_qgsdoccoverage.py)
@@ -0,0 +1,9 @@
#!/usr/bin/env bash


# check that returns are placed before note and since
output=$(unbuffer ag --noaffinity --file-search-regex '\.h$' --multiline '\\(note|since)[^\n]+(\n\s*\* [^\n]+)*\n\s*\* \\return' ${TRAVIS_BUILD_DIR} | tee /dev/stderr)
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

0 comments on commit e6f657c

Please sign in to comment.
You can’t perform that action at this time.