diff --git a/utils/ci/scripts/25_check_inline_docu.sh b/utils/ci/scripts/25_check_inline_docu.sh index ae0f132d8cdcdce6cc688250f2549862b70a1149..c9c1f577cffe7aa5341dd870d1c19c107196326a 100755 --- a/utils/ci/scripts/25_check_inline_docu.sh +++ b/utils/ci/scripts/25_check_inline_docu.sh @@ -14,51 +14,73 @@ # This script checks the inline documentation using doxygen ################################################################################ -MYDIR="$(dirname "$(readlink -f $0)")" +filter() { + local version="$1" + local message="$2" + local sed_command="$3" + + # Version Comparison + # Based on: https://unix.stackexchange.com/a/285928 + # Creator: Luciano Andress Martini + # Licence: CC BY-SA 4.0 - https://creativecommons.org/licenses/by-sa/4.0/ + if [ "$(printf '%s\n' "$version" "$doxy_version" | sort -V | head -n1)" = "$version" ]; then + echo "Filtering warning/errors for doxygen $version: $message" + sed -i "$sed_command" "doc/DoxygenWarningLog.txt" + fi +} + +MYDIR="$(dirname "$(readlink -f "$0")")" cd "$MYDIR/../../../../build" || exit 1 +doxy_version="$(doxygen --version)" +echo "Doxygen Version $doxy_version" make MantleAPI_doc -# version comparison - https://unix.stackexchange.com/a/285928 -# under CC BY-SA 4.0 - https://creativecommons.org/licenses/by-sa/4.0/ +# filter diverse erroneous messages due to bugs in the individual doxygen versions -# dealing with bugs in Doxygen 1.8.17 (or earlier) # bug description - https://github.com/doxygen/doxygen/issues/7411 # fixed in 1.8.18 - https://github.com/doxygen/doxygen/pull/7483 -if [ "$(printf '%s\n' "1.8.17" "$doxy_version" | sort -V | head -n1)" = "$doxy_version" ]; then - echo "Filtering Doxygen warnings \"return type of member ... is not documented\" (see https://github.com/doxygen/doxygen/issues/7411)" - sed -i '/warning: return type of member/d' "doc/DoxygenWarningLog.txt" -fi +filter "1.8.17" \ + "Warnings \"return type of member ... is not documented\" (see https://github.com/doxygen/doxygen/issues/7411)" \ + "/warning: return type of member/d" + +# issues with markdown importer +filter "1.9.1" \ + "Warning: README\.md##: warning: Unsupported xml/html tag <TAG> found" \ + "/README.md:[0-9]\+: warning: Unsupported xml\/html tag <.*> found/d" + +# issues with quoted text +filter "1.9.1" \ + "Warning: floating_point_helper: Exlicit link request to 'epsilon()' could not be resolved" \ + "/warning: explicit link request to 'epsilon()' could not be resolved/d" -# dealing with bugs in Doxygen 1.9.7 (or earlier) -# bug description - https://github.com/doxygen/doxygen/issues/8091 -if [ "$(printf '%s\n' "1.9.7" "$doxy_version" | sort -V | head -n1)" = "$doxy_version" ]; then - echo "Filtering Doxygen warnings \"Member MantleAPI_ ... is not documented\" (see https://github.com/doxygen/doxygen/issues/8091)" - sed -i '/warning: Member MantleAPI_.*is not documented/d' "doc/DoxygenWarningLog.txt" -fi -# dealing with DOT issues bugs in Doxygen 1.9.7 (or earlier) # bug description - https://github.com/doxygen/doxygen/issues/8091 -if [ "$(printf '%s\n' "1.9.7" "$doxy_version" | sort -V | head -n1)" = "$doxy_version" ]; then - echo "Filtering Doxygen error: Problems running dot: exit code=2, command='dot' (Doxygen 1.9.7)" - sed -i "/error: Problems running dot: exit code=2, command='dot'/d" "doc/DoxygenWarningLog.txt" - sed -i "/error: Problems running dot: exit code=2, command='dot.exe'/d" "doc/DoxygenWarningLog.txt" - # remove blank lines - sed -i '/^\s*$/d' "doc/DoxygenWarningLog.txt" -fi +filter "1.9.7" \ + "Warnings \"Member MantleAPI_ ... is not documented\" (see https://github.com/doxygen/doxygen/issues/8091)" \ + "/warning: Member MantleAPI_.*is not documented/d" +filter "1.9.7" \ + "Error: Problems running dot: exit code=2, command='dot'" \ + "/error: Problems running dot: exit code=2, command='dot'/d" +filter "1.9.7" \ + "Error: Problems running dot: exit code=2, command='dot.exe'" \ + "/error: Problems running dot: exit code=2, command='dot.exe'/d" # filtering warnings not related to in-line documentation sed -i "/Detected potential recursive class relation/d" "doc/DoxygenWarningLog.txt" +# hotfixing CI (see issue https://gitlab.eclipse.org/eclipse/openpass/mantle-api/-/issues/68) +sed -i "/error: Problems running gswin32c.exe. Check your installation\!/d" "doc/DoxygenWarningLog.txt" + # remove blank lines sed -i '/^\s*$/d' "doc/DoxygenWarningLog.txt" -if [ -s "doc/DoxygenWarningLog.txt" ] -then + +if [ -s "doc/DoxygenWarningLog.txt" ]; then echo "ERROR: Doxygen warnings" cat "doc/DoxygenWarningLog.txt" exit 1 else echo "No Doxygen warnings found" exit 0 -fi \ No newline at end of file +fi