I ran a Code review on a module file that didn't have an @file block, and no warning was returned. Oddly, the testbot on Drupal.org does catch the missing file block. Not sure why.

I am running Coder 6.x-2.x, Tough Love 1.x, minor severity, and all review types selected.

CommentFileSizeAuthor
#2 coder-1360442-2.patch524 bytesdanepowell

Comments

danepowell’s picture

And here's an interesting observation- if I change 'file' to an arbitrary string (coder_comment.inc line 70), so that Coder is searching for @asdf instead of @file, Coder properly reports that it's missing in all files EXCEPT for my_module.module.

danepowell’s picture

StatusFileSize
new524 bytes

Okay, I've figured out a workaround, but I'm not sure it's the right solution- the problem is related to the #filename-not option.

douggreen’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev

Did your filename has "patch" in it? Or were you testing a patch file?

danepowell’s picture

Hrm... it's been some time since I looked at this, but I'm quite sure that the file in question was a .module file. I'm not sure why adding #filename-not' => array('patch'), helped, but it did :)

douggreen’s picture

Status: Active » Closed (duplicate)

It's possible that this is related to #726688: Some comments rules are not trigered in module files, so if your @file was in one of the allowed_extensions but not the php_extensions, it was probably missed.