- Issue created by @borisson_
- Merge request !11125Issue #3503982: Fix Drupal.Commenting.FunctionComment.MissingReturnComment in... → (Closed) created by sayan_k_dutta
- 🇮🇳India sayan_k_dutta
The pipeline is still failing for missing return types in the following files
core/lib/Drupal/Component/Annotation/Reflection/MockFileFinder.php core/lib/Drupal/Component/Diff/DiffFormatter.php core/lib/Drupal/Core/Diff/DiffFormatter.php
It has also some spell check errors.
Moving it to needs work. The pipeline needs to be fixed. Help from someone will be welcome. - 🇳🇿New Zealand quietone
@sayan_k_dutta, thanks for working on this issue!
Unfortunately, this issue does not have the usual explanation in the Issue Summary for how to work on coding standards issue. We rely on
phpcs
to ensure that code meets our standards → . The way we do that is to add a rule to the filephpcs.xml.dist
, runcomposer phpcs
and then fix the errors reported. I've update this issue summary with a link to a parent issue that has the steps and the remaining tasks with the change needed tophpcs.xml.dist
.You've been diligent and made changes according to the issue title resulting in changes that are not needed. For example, some are for files that are ignored by
phpcs
. Those files have a comment at the start of the file,// phpcs:ignoreFile
. The number of files changed in the MR is 149 where it should be 25 with less than 100 changes. I suggest starting from 11.x, updating phpcs.xml.dist and runningcomposer phpcs
which will output the files and lines that need to be changed.If you haven't already been referring to them, the relevant docs are API documentation and comment standards → .
- 🇳🇿New Zealand quietone
Wait a minute. I made a huge mistake here. I was testing with Drupal.Commenting.FunctionComment.Missing not Drupal.Commenting.FunctionComment.MissingReturnComment. It turns out that this is a duplicate of 📌 Fix Drupal.Commenting.FunctionComment.MissingReturnComment in core/lib/Drupal/Core/f-z RTBC .
Core have the following, which means this really is already fixed.
<rule ref="Drupal.Commenting.FunctionComment.MissingReturnComment"> <include-pattern>core/lib/Drupal/Core/*</include-pattern> <include-pattern>core/lib/Drupal/Component/*</include-pattern> </rule>
The sniff is not yet enabled for all of core. I'll setup more issues.
- 🇳🇿New Zealand quietone
@sayan_k_dutta, I've setup two more issue for the sniff Drupal.Commenting.FunctionComment.MissingReturnComment. They are 📌 Fix Drupal.Commenting.FunctionComment.MissingReturnComment in core/tests Active and 📌 Fix Drupal.Commenting.FunctionComment.MissingReturnComment in extension tests Active . The instructions are included on those issues as well. I hope to see there.
cheers