diff --git a/doc/doxygen.warnings.report.sh b/doc/doxygen.warnings.report.sh index 3faa1385f..4130d8971 100755 --- a/doc/doxygen.warnings.report.sh +++ b/doc/doxygen.warnings.report.sh @@ -148,7 +148,9 @@ skip_intro=0 filter_blacklist=1 filter_examples=0 filter_test=0 +explicit_m_option=0 filter_module="" +explicit_f_option=0 filter_in="" filter_out="" @@ -159,7 +161,9 @@ while getopts :bef:F:hilm:s:tvw option ; do (e) filter_examples=1 ;; - (f) filter_in="$OPTARG" ;; + (f) filter_in="$OPTARG" + explicit_f_option=1 + ;; (F) filter_out="$OPTARG" ;; @@ -169,7 +173,9 @@ while getopts :bef:F:hilm:s:tvw option ; do (l) use_standard=1 ;; - (m) filter_module="$OPTARG" ;; + (m) filter_module="$OPTARG" + explicit_m_option=1 + ;; (s) use_filearg=1 logfile_arg="$OPTARG" @@ -225,6 +231,10 @@ function REappend eval "${param}=\"${!param:-}${!param:+\\|}$token\"" } +# Explicit -f or -m with empty args should filter out all, not pass all +[[ $explicit_f_option -eq 1 && "${filter_in:-}" == "" ]] && filter_out=".*" +[[ $explicit_m_option -eq 1 && "${filter_module:-}" == "" ]] && filter_out=".*" + # Filter in regular expression for -m and -f filter_inRE="" [[ "$filter_module" != "" ]] && REappend filter_inRE src/$filter_module @@ -244,7 +254,7 @@ REappend filter_blacklistRE "ScheduleWithContext(uint32_t" REappend filter_blacklistRE "Schedule\\(Now\\|Destroy\\)(\\(MEM\\|void\\)" # ATTRIBUTE_HELPER_CPP( and _HEADER( -REappend filter_blacklistRE "ATTRIBUTE_HELPER_\\(CPP\\|HEADER\\)(" +REappend filter_blacklistRE "ATTRIBUTE_HELPER_\\(CPP\\|HEADER\\)" # Filter out regular expression for black list, -e, -t and -F filter_outRE=""