- Issue created by @dww
- Status changed to Needs review
over 1 year ago 12:12am 20 June 2023 - 🇬🇧United Kingdom jonathan1055
This is similar to the issue I raised #3357647: Trailing blanks in the includes template files →
Could fix those files here too.
- Status changed to Needs work
over 1 year ago 3:47pm 18 July 2023 - 🇪🇸Spain fjgarlin
I'd say let's address the related issue here too, since we already have a starting MR.
Marking as NW and will close the other one as duplicate. - Status changed to Needs review
over 1 year ago 9:45pm 18 July 2023 - 🇺🇸United States dww
Rebased on 1.0.x branch.
Pushed another commit to remove all trailing whitespace.Thanks,
-Derek - 🇬🇧United Kingdom jonathan1055
Thanks. Before we commit this, just need to make sure these are checked to prevent regression. I have aded yml into the list of extensions being checked, and the summary below shows that they are being tested. But the faults are not being reported.
PHP CODE SNIFFER REPORT SUMMARY -------------------------------------------------------------- FILE ERRORS WARNINGS -------------------------------------------------------------- gitlab-ci/template.gitlab-ci.yml 0 0 includes/include.drupalci.main.yml 0 0 includes/include.drupalci.variables.yml 0 0 includes/include.drupalci.workflows.yml 0 0 scripts/expand_composer_json.php 0 0 scripts/symlink_project.php 0 0 -------------------------------------------------------------- A TOTAL OF 0 ERRORS AND 0 WARNINGS WERE FOUND IN 6 FILES --------------------------------------------------------------
- Status changed to Needs work
over 1 year ago 8:59am 19 July 2023 - 🇪🇸Spain fjgarlin
Is there a way where we can add to this repo ".gitlab-ci.yml" file a way to check the syntax of the files within this repo? Like our own "phpcs" within this repo.
If somebody introduces a new spacing error tomorrow, it'll be undetected, but if we add a job to check the syntax of the files in this repo we might detect it when the pipeline runs.
So ideally we'll fix the spacing issues in this MR (done) and also prevent future instances of the issue (what I'm asking above).
- 🇬🇧United Kingdom jonathan1055
Also phpcs does not appear to be run on gitlab_templates files as part of the normal testing. Is it appropriate to add a phpcs step into
gitlab_templates/-/blob/1.0.x/.gitlab-ci.yml - 🇬🇧United Kingdom jonathan1055
Just realised that .yml syntax and standards are checked in ESLINT not PHPCS, so we'd need to add both of those steps.
- 🇬🇧United Kingdom jonathan1055
The two .php files had
// phpcs:ignoreFile
but they were passing nearly everything, so I pushed a change to test them.However, I have now realised that there are symlinks to these two files created in the
$CI_PROJECT_DIR/$_WEB_ROOT/modules/custom/$CI_PROJECT_NAME
folder. So maybe they should be ignored, in case a project implementing gitlab_templates has different sniffs or different settings and then these two files might not pass and would be reported when running phpcs on that project. - Assigned to jonathan1055
- 🇬🇧United Kingdom jonathan1055
Yes I noticed, and had it on my list. I will work on it. The scope has crept. Might be better to split into two.
- Issue was unassigned.
- 🇬🇧United Kingdom jonathan1055
Hi zkhan.aamir,
Just wondering is you are intending to work on this issue? When someone alters the assigned user it is usually because they are taking over the work, and they assign the issue to themselves. Or it is the project maintainer making changes to who the issue is assigned to. But you have just left it as 'unassigned'. I'm happy for you to work on this issue if you want to, but just let me know so that we don't both do it and cause wasted effort. - Status changed to Closed: duplicate
10 months ago 2:42pm 8 March 2024 - 🇪🇸Spain fjgarlin
I started working on the fixes and the tool to detect the errors in #3426647: Check our own coding standards and basic editor configurations → .
I'll close this one in favor of the new one to avoid rebases, etc here. Will transfer credits there.