Problem/Motivation

Some descriptions Test files are malformed. For example :

/**
 * @file
 * Contains Drupal\Component\Render\FormattableMarkup.
 */

Miss a \.

core/lib/Drupal/Core/Render/Placeholder/SingleFlushStrategy.php
/**
 * @file
 * Contains \Drupal\Core\Render\Placeholder\SingleFlushStrategy
 */

Doesn't end in a period (.)

Proposed resolution

  • Add this missing \ to all tests definitions
  • Add the missing . to the end of all @file declarations

RC Target evaluation

Only changes comments to make them consistent. Not disruptive at all.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

GoZ created an issue. See original summary.

GoZ’s picture

Status: Active » Needs review
FileSize
15.91 KB
anil280988’s picture

Hi Goz,
4 files still remaining which still misses a \. Added a new patch which include these 4 filles.
-- a/core/modules/node/src/Tests/NodeOwnerTest.php
-- a/core/modules/system/src/Tests/Field/FieldItemTest.php
-- a/core/modules/system/src/Tests/Field/FieldItemTest.php
-- a/core/modules/system/src/Tests/Form/ElementsAccessTest.php

anil280988’s picture

Status: Needs work » Needs review

Changed the status

Status: Needs review » Needs work

The last submitted patch, 3: bad_file_description-2600304-3.patch, failed testing.

marvin_B8’s picture

justAChris’s picture

Issue summary: View changes
Status: Needs review » Needs work

We should also handle the cases where the @file description does not end with a period (.) since there are only a few of those.

This grep should find those:
grep -R '* Contains \\D.*[^.]$' core/

There are also cases where the namespace or classname in the description does not match the file contents, but will separate that out into a different issue.

justAChris’s picture

Issue summary: View changes

Adds an example of missing trailing period to issue summary.

justAChris’s picture

Issue tags: +rc eligible

And adding rc eligible tag since this issue should only clean up documentation.

marvin_B8’s picture

marvin_B8’s picture

Status: Needs work » Needs review
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Thanks!

The last submitted patch, 3: bad_file_description-2600304-3.patch, failed testing.

xjm’s picture

Status: Reviewed & tested by the community » Fixed

I used git diff --color-words to confirm that this patch only adds leading slashes or periods to the @file docblocks. Thanks for the cleanup! Committed and pushed to 8.0.x.

  • xjm committed cced89e on 8.0.x
    Issue #2600304 by marvin_B8, anil280988, GoZ, justAChris: Bad @file...

Status: Fixed » Closed (fixed)

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