Problem/Motivation


FILE: /var/www/html/drupal8/web/modules/diff_plus/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
 37 | WARNING | Line exceeds 80 characters; contains 91 characters
 38 | WARNING | Line exceeds 80 characters; contains 84 characters
 39 | WARNING | Line exceeds 80 characters; contains 88 characters
----------------------------------------------------------------------


FILE: ...ff_plus/tests/src/FunctionalJavascript/DiffPlusRawHtmlLayoutPluginTest.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 67 | WARNING | t() calls should be avoided in classes, use
    |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
    |         | $this->t() instead
--------------------------------------------------------------------------------

Comments

Neeraj333 created an issue. See original summary.

Neeraj333’s picture

Assigned: Neeraj333 » Unassigned
Status: Active » Needs review
StatusFileSize
new1.4 KB

Status: Needs review » Needs work

The last submitted patch, 2: fix_coding_standard-3334701-2.patch, failed testing. View results

luke.leber’s picture

Hi @Neeraj333,

I cannot commit this, as it would break the automated testing suite.

It appears that that t method does not exist in tests. Generally, we can forego translation in tests, as it's out of scope for the units that are under test (Drupal Core tests translation for us already).

The test bot has rightfully set this issue back to "Needs Work", meaning that an additional patch and/or merge request that passes automated testing is needed in order to progress to "Needs Review".

Thanks

damienmckenna’s picture

The README.md changes make the file worse and should not be used. The t() fix is useful, but it might be worth looking to see if there are other useful changes that could be made.

damienmckenna’s picture

Title: Drupal Coding Standard phpcs » Coding standards improvement for README.md
Status: Needs work » Needs review
StatusFileSize
new838 bytes
new835 bytes

Here's a reroll of the README.md changes, that's all that's left of this proposed change.

The t() function was already fixed in #3333973.

luke.leber’s picture

Status: Needs review » Fixed

Thanks Damien. I'm hoping to get this entirely stabilized and under the SA program by mid-February after client UAT passes.

Due to the nature of markup manipulation here, I think getting this involved in the SA program will be critical.

Status: Fixed » Closed (fixed)

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