Closed (fixed)
Project:
Drupal Code Sniffer
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Dec 2011 at 23:16 UTC
Updated:
24 Jan 2012 at 08:40 UTC
Drupal CS reports spurious formatting errors in templates, which use < ?php ? > frequently. Sometimes, when Drupal CS encounters a line with ?>, it emits an error explaining that a file should end with a new line.
Example:
120 col 4 error| Files must end in a single new line character
The line in question (line 120) is not the end of a file. It is just a line that contains } ?>.
This happens inconsistently. Not all such lines get that error.
Example:
In another case, a line like this generates the same error:
< ?php } ? >
125 col 10 error| Files must end in a single new line character
In all cases, the closing PHP marker seems to be close to the end, but not the last line.
Comments
Comment #1
klausiI just worked on that today, can you checkout the most recent version of drupalcs and try again? And please point me to the file in question that you tested.
Comment #2
klausiReopen if still an issue.