Skip to content
Snippets Groups Projects

Fix minor issues

Merged Raghunandan Netrapalli Madhusudhan requested to merge fix-minor-issues into develop
4 files
+ 72
73
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 72
22
@@ -14,46 +14,95 @@
# This script checks the inline documentation using doxygen
################################################################################
# compare two versions using semantic version syntax
#
# usage: greater_or_equal "1.2.3" "2.3.4"
# param lhs: left hand side of the operation "lhs >= rhs"
# param rhs: right hand side of the operation "lhs >= rhs"
greater_or_equal()
{
local v_lhs="$1"
local v_rhs="$2"
local version_regex='([0-9]+\.[0-9]+\.[0-9]+)'
[[ $v_lhs =~ $version_regex ]] && v_lhs=${BASH_REMATCH[1]}
[[ $v_rhs =~ $version_regex ]] && v_rhs=${BASH_REMATCH[1]}
IFS='.' read -r -a i_lhs <<< "$v_lhs"
IFS='.' read -r -a i_rhs <<< "$v_rhs"
for ((i = 0; i < ${#i_rhs[@]}; i++)); do
if [ "${i_rhs[i]}" -gt "${i_lhs[i]}" ]; then
return 1
fi
done
return 0
}
sed_if_greater_or_equal()
{
local lhs="$1"
local rhs="$2"
local message="$3"
shift 3
local sed_commands=("$@")
if greater_or_equal "$lhs" "$rhs"; then
echo "Filtering warning/errors for doxygen "$lhs": $message"
for sed_command in "${sed_commands[@]}"; do
echo "sed -i \"$sed_command\" \"DoxygenWarningLog.txt\""
sed -i "$sed_command" "DoxygenWarningLog.txt"
done
fi
}
filter()
{
local bug_detected_version="$1"
local message="$2"
shift 2
local remaining_args=("$@")
sed_if_greater_or_equal $doxy_version "${bug_detected_version}" "${message}" "${remaining_args[@]}"
}
MYDIR="$(dirname "$(readlink -f $0)")"
cd "$MYDIR/../../.." || exit 1
doxy_version="$(doxygen --version)"
doxy_version="$(doxygen --version | grep -oP '[0-9]+\.[0-9]+\.[0-9]+')"
echo "Doxygen Version $doxy_version"
doxygen Doxyfile
# 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)
# dealing with bugs in Doxygen 1.8.17 (or later)
# 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' DoxygenWarningLog.txt
fi
filter "1.8.17" \
"Filtering Doxygen warnings \"return type of member ... is not documented\" (see https://github.com/doxygen/doxygen/issues/7411)" \
"/warning: return type of member/d"
# dealing with bugs in Doxygen 1.9.7 (or earlier)
# dealing with bugs in Doxygen 1.9.1 (or later)
# 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 OpenPASS_ ... is not documented\" (see https://github.com/doxygen/doxygen/issues/8091)"
sed -i '/warning: Member OpenPASS_.*is not documented/d' DoxygenWarningLog.txt
fi
filter "1.9.1" \
"Filtering Doxygen warnings \"Member OpenPASS_ ... is not documented\" (see https://github.com/doxygen/doxygen/issues/8091)" \
"/warning: Member OpenPASS_.*is not documented/d"
# dealing with DOT issues bugs in Doxygen 1.9.7 (or earlier)
# dealing with DOT issues bugs in Doxygen 1.9.6 (or later)
# 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" DoxygenWarningLog.txt
sed -i "/error: Problems running dot: exit code=2, command='dot.exe'/d" DoxygenWarningLog.txt
# remove blank lines
sed -i '/^\s*$/d' DoxygenWarningLog.txt
fi
filter "1.9.6" \
"Filtering Doxygen error: Problems running dot: exit code=2, command='dot'" \
"/error: Problems running dot: exit code=2, command='dot'/d" \
"/error: Problems running dot: exit code=2, command='dot.exe'/d" \
"/^\s*$/d"
# filtering warnings related to missing Mantle_API documenation
echo "Filtering warnings related to missing Mantle_API documenation"
sed -i "/thirdParty\/linux64\/scenario_api/d" DoxygenWarningLog.txt
sed -i "/conanThirdParty\/MantleAPI/d" DoxygenWarningLog.txt
sed -i "/ parameter 'map_file_path'/d" DoxygenWarningLog.txt
sed -i "/ parameter 'map_details'/d" DoxygenWarningLog.txt
sed -i "/ parameter 'lateral_state'/d" DoxygenWarningLog.txt
sed -i "/ parameter 'longitudinal_state'/d" DoxygenWarningLog.txt
sed -i "/core::LaneLocationQueryService::GetRelativeLaneId/d" DoxygenWarningLog.txt
sed -i "/ parameter 'relative_lane_target'/d" DoxygenWarningLog.txt
sed -i "/of member mantle_api::/d" DoxygenWarningLog.txt
@@ -70,5 +119,6 @@ then
cat DoxygenWarningLog.txt
exit 1
else
echo "SUCCESS: No Doxygen warnings found"
exit 0
fi
Loading