Closed (fixed)
Project:
Coder
Version:
7.x-1.x-dev
Component:
Coder Review
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jun 2012 at 20:20 UTC
Updated:
5 Sep 2012 at 20:57 UTC
Jump to comment: Most recent
Comments
Comment #1
Anonymous (not verified) commentedIt appears the coder review module is incorrectly parsing .info files as PHP. The code to resolve this issue actually exists in the module, but for some reason it is commented out (coder_review.module, lines 1203 - 1217):
I've got the same problems and a pre-commit hook is preventing me from committing my changes. For now, I have un-commented lines 1203 - 1217 and updated the git index so the file is excluded from my commits:
git update-index --assume-unchanged coder_review/coder_review.moduleComment #2
douggreen commentedhrm, those lines of code are already commented out in the 7.x-1.x and 7.x-2.x versions.I believe that the project page says that the recommended version is the 7.x-1.x dev version, not the 7.x-1.0 version. But I see how using a dev version is confusing. I'll likely create a 7.x-1.1 version as soon as I create the 7.x-2.1 version, probably a month from now.
I'm going to leave this open because as part of the 7.x-2.x upgrade I want to make info file parsing better.
Comment #3
fonant commentedThe problem is fixed if you un-comment those lines. Using the 7.x-1.x-dev version doesn't help.
Comment #4
douggreen commentedOk, thanks. The commit http://drupalcode.org/project/coder.git/commit/97a71302 that broke it, I believe was done so that js files could use the coder rules engine. I think that the best solution here is a js exception, rather than to assume all files are PHP. We already have a variable to define #php_extensions, which should cover all known PHP extensions. If there are other non PHP code files that need to be tokenize "like" PHP, we'll need exceptions for them too.
We are really talking about the lexical phase here, not the parse phase. So treating "js" like "php" is fine with me .... internally to the code we should call the variable in_code rather than in_php. But changing the usages of php in all of coder's code is a bit more than I want to do right now. I added a code comment to this affect.
See http://drupalcode.org/project/coder.git/commit/97744fb
Comment #5
stella commentedThat looks better alright. I hadn't realised that change had broken .info file reviews. I like the addition of the $ext checks.