Problem/Motivation
In GitLabCI testing now that Drupal 11.1 is the current version, I have started to see this PHPCS failure:
FILE: ...builds/project/ip2country/web/modules/custom/ip2country/recipes/README.txt
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
9 | ERROR | [x] Expected 1 newline at end of file; 2 found
| | (Drupal.Files.EndFileNewline.TooMany)
--------------------------------------------------------------------------------
See https://git.drupalcode.org/project/ip2country/-/jobs/3792045
The problem showed up in my weekly scheduled testing as of 21 Dec - this did not happen in the previous test on 14 Dec when the current core version was 11.0.
Note that the recipes/README.txt
is not present in my project's repository, so I assume this is something that is added during GitLabCI testing. Regardless, it's not part of my project so I can't fix it in my project.
I think that what is happening is that core/assets/scaffold/files/recipes.README.txt
is being copied into my project for testing purposes (why?).
This core README.txt does have the above problem - there's a blank line at the end when there shouldn't be. This was committed in #3447886: Add support for recipes to drupal/recommended-project and drupal/legacy-project, so perhaps someone can look to see how that was put into core with a PHPCS violation?
Here's a patch to fix that file, which hopefully trickles down to fix the issue in my project's testing.