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

klausi’s picture

Status: Active » Postponed (maintainer needs more info)

I 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.

klausi’s picture

Status: Postponed (maintainer needs more info) » Fixed

Reopen if still an issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.