mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-15 00:07:25 -05:00
add test to check that \since and \deprecated are at the end of command blocks
This commit is contained in:
parent
fc55d869a0
commit
70f8266495
@ -8,6 +8,17 @@ if [[ ! -z $output ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check that \since and \deprecated are placed at the end of the command block
|
||||
output=$(unbuffer ag --noaffinity --file-search-regex '\.h$' --multiline '(\\(deprecated|since)[^\n]+\n)+\s*\*[^\/]' ${TRAVIS_BUILD_DIR} | tee /dev/stderr)
|
||||
if [[ ! -z $output ]]; then
|
||||
echo -e "\n\x1B[31m*** Docstring computation: \\\deprecated and \\\since should e placed at the end of command locks\x1B[0m"
|
||||
echo -e "To fix it, you may want to run at the top level directory:"
|
||||
echo 'sed -i -r '"'"'$!N;s/^(\s*\*\s+\\(deprecated|since)[^\n]+)\n(\s*\*[^\/].*)/\3\n\1/;P;D'"'"' $(ag -c --noaffinity --file-search-regex '"'"'\.h$'"'"' --multiline '"'"'(\\(deprecated|since)[^\n]+\n)+\s*\*[^\/]'"'"' . | cut -d: -f1)'
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user