Also check HTML and XML files

This commit is contained in:
Pierre Pronchery 2019-03-28 15:36:50 +01:00
parent f5151f322a
commit 2cfb7869a4

View File

@ -72,6 +72,9 @@ _fixme()
conf|sh)
callback="_fixme_sh"
;;
htm|html|xml)
callback="_fixme_xml"
;;
esac
[ -n "$callback" ] || continue
($callback "$filename") 2>&1
@ -122,6 +125,19 @@ _fixme_sh()
return $ret
}
_fixme_xml()
{
ret=0
filename="$1"
#XXX limited to a single line
#warnings
$GREP -nH '<!--.*\(TODO\|XXX\)' "$filename"
#failures
$GREP -nH '<!--.*FIXME' "$filename" && ret=2
return $ret
}
#debug
_debug()