todochecker: don't match variables called $todo or fields called ->todo.

This commit is contained in:
tjhunt 2009-07-17 07:40:54 +00:00
parent 086d27e4e1
commit 1c5648f169

View File

@ -110,7 +110,7 @@ function check_to_dos($filepath) {
$lines = file($filepath);
$matchesinfile = array();
foreach ($lines as $lineno => $line) {
if (preg_match('/\bTODO\b/i', $line)) {
if (preg_match('/(?<!->|\$)\bTODO\b/i', $line)) {
$matchesinfile[$lineno] = $line;
}
}