checksrc.pl: warn on FIXME/TODO comments

This commit is contained in:
Daniel Stenberg 2025-02-10 11:20:36 +01:00
parent 94c596bbc5
commit 71ace9f3c1
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -525,6 +525,12 @@ sub scanfile {
$line, length($1) + 1, $file, $l, $line, length($1) + 1, $file, $l,
"Missing space end comment end"); "Missing space end comment end");
} }
if($l =~ /(.*)(FIXME|TODO)/) {
checkwarn("FIXME",
$line, length($1), $file, $l,
"Avoid $2 comments. Add to documentation instead");
}
# ------------------------------------------------------------ # ------------------------------------------------------------
# Above this marker, the checks were done on lines *including* # Above this marker, the checks were done on lines *including*
# comments # comments