]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
checksrc.pl: warn on FIXME/TODO comments
authorDaniel Stenberg <daniel@haxx.se>
Mon, 10 Feb 2025 10:20:36 +0000 (11:20 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 10 Feb 2025 13:44:12 +0000 (14:44 +0100)
scripts/checksrc.pl

index 876265a53e839a01c03cc5d4e4a19298b63bb6a3..8289c14c5c6e2d1b46d7daa8bcd0e370cf7f2583 100755 (executable)
@@ -525,6 +525,12 @@ sub scanfile {
                       $line, length($1) + 1, $file, $l,
                       "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*
         # comments