- Issue created by @jonathan1055
- 🇬🇧United Kingdom jonathan1055
I've looked into this, and found some improvements we can make to the Check Code phpcs to highlight and fix things in .md files . However, I have found that the trailing spaces sniff
Squiz.WhiteSpace.SuperfluousWhitespace.EndLine
will not actually detect trailing spaces in .md files because it only works inside<?php
tags.I will push the other changes here anyway, then maybe make an enhancement to our
unformatted-links.php
script to detect trailing spaces. That should be easy to do, and it will be a while before any of the issues listed in the summary are resolved and we get an "official" job to do it. - 🇬🇧United Kingdom jonathan1055
The first change is to use the short class name for the standards. We did this for the default contrib phpcs.xml.dist, but forgot to do it for out internal phpcs.xml. Job runs OK
https://git.drupalcode.org/issue/gitlab_templates-3543301/-/pipelines/58...The second change is to simplify the phpcs commands by setting the flags and options in the phpcs.xml file instead of on the command line. All OK, and it also works OK locally
https://git.drupalcode.org/issue/gitlab_templates-3543301/-/pipelines/58... - 🇬🇧United Kingdom jonathan1055
Next change is to include docs in the files checked by phpcs. It fails, mainly due to the long lines which is to be expected
https://git.drupalcode.org/issue/gitlab_templates-3543301/-/jobs/6386981Adding summary and source reports, via the phpcs.xml file, and excluding the linelength sniff from .md we get just a few failures, which can be fixed
https://git.drupalcode.org/issue/gitlab_templates-3543301/-/jobs/6387157