There are some coding standard issues in module.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jayesh_makwana created an issue. See original summary.

jayesh_makwana’s picture

We create a patch for solving coding standard issues for this module. Please check and apply it.

jcisio’s picture

Status: Active » Needs work

Patch no longer applies.

jcisio’s picture

Assigned: jayesh_makwana » Unassigned
Deepthi kumari’s picture

Status: Needs work » Needs review
StatusFileSize
new8.59 KB

Hi,
Applied the patch, needs review.

voleger’s picture

Status: Needs review » Needs work
  1. README.md does not follow best practices (headings need to be uppercase). See https://www.drupal.org/node/2181737
  2. The media_entity_soundcloud.module does not implement hook_help(). See https://www.drupal.org/docs/develop/documenting-your-project/module-documentation-guidelines#hook_help
jcisio’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev

We won't fix coding standards for 1.x branch.

urvashi_vora’s picture

Status: Needs work » Needs review
StatusFileSize
new4.05 KB

Hi @jcisio,

I tried resolving all errors for 8.x-2.x-dev. I am applying a patch. Please review it.

libbna’s picture

+++ b/src/Form/SoundcloudForm.php
@@ -128,14 +134,15 @@ class SoundcloudForm extends AddFormBase {
\ No newline at end of file

Add a new line at EOF.

libbna’s picture

Status: Needs review » Needs work
ruturaj chaubey’s picture

Assigned: Unassigned » ruturaj chaubey

Working on this.

ruturaj chaubey’s picture

StatusFileSize
new4.02 KB

Added a patch. Please review this.

ruturaj chaubey’s picture

Assigned: ruturaj chaubey » Unassigned
Status: Needs work » Needs review
libbna’s picture

Assigned: Unassigned » libbna

I will review.

libbna’s picture

Assigned: libbna » Unassigned

Not able to apply the #12 patch.

ruturaj chaubey’s picture

Assigned: Unassigned » ruturaj chaubey

Will work on this.

chakkche’s picture

Status: Needs review » Needs work
shashwat purav’s picture

Hi @Ruturaj Chaubey, are you still working on this?

ruturaj chaubey’s picture

Assigned: ruturaj chaubey » Unassigned
shashwat purav’s picture

Status: Needs work » Needs review
StatusFileSize
new3.97 KB

Added a patch. Please review this.

chakkche’s picture

Assigned: Unassigned » chakkche
chakkche’s picture

Version: 8.x-2.x-dev » 3.x-dev
Status: Needs review » Needs work

I think this needs to be validated against latest branch i.e 3.x as 8.x-2.x branch doesn't seems to be no longer monitored. Even after applying patch from #20 i can still see some coding standards issues.

FILE: ...home/chakkche/contribs/media_entity_soundcloud/src/Form/SoundcloudForm.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 1 LINE
--------------------------------------------------------------------------------
118 | ERROR | [x] Expected "void|true" but found "void|TRUE" for function
| | return type
118 | ERROR | [ ] @return doc comment specified, but function has no return
| | statement
118 | ERROR | [ ] Description for the @return value is missing
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...he/contribs/media_entity_soundcloud/src/Plugin/media/Source/Soundcloud.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------
84 | WARNING | t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait and
| | $this->t() instead
86 | WARNING | t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait and
| | $this->t() instead
--------------------------------------------------------------------------------

FILE: ...chakkche/contribs/media_entity_soundcloud/media_entity_soundcloud.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | WARNING | "core_version_requirement" property is missing in the info.yml
| | file
--------------------------------------------------------------------------------

Time: 173ms; Memory: 10MB

chakkche’s picture

Assigned: chakkche » Unassigned
Status: Needs work » Needs review
StatusFileSize
new5.33 KB

Here is the patch against branch 3.x

Status: Needs review » Needs work

The last submitted patch, 23: coding-standards-2886457-23.patch, failed testing. View results

sourabhjain’s picture

Status: Needs work » Needs review
StatusFileSize
new3.48 KB

I have resolved all PHPCS issue. Please review.

Status: Needs review » Needs work

The last submitted patch, 25: 2886457-25.patch, failed testing. View results

bruno.bicudo’s picture

StatusFileSize
new5.34 KB

There was one last error on PHPCS:

FILE: ...Desktop/Contrib_Envs/Modules/web/modules/contrib/media_entity_soundcloud/src/Plugin/media/Source/Soundcloud.php
---------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------
 85 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
    |         | and $this->t() instead
 87 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
    |         | and $this->t() instead
---------------------------------------------------------------------------------------------------------------------

I corrected this one and added StringTranslationTrait to the class. Also, the failing tests were due to the link that was being used on SoundcloudEmbedFormatterTest.php that was removed. I changed it for another link (same music, Billie Jean Remix XD).

Needs review :)

bruno.bicudo’s picture

Status: Needs work » Needs review
matheusmaciel’s picture

Assigned: Unassigned » matheusmaciel

I'll review it!

matheusmaciel’s picture

Assigned: matheusmaciel » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new18.91 KB

I just reviewed it and it looks good for me! I ran phpcs for Coding Standards and Best Practices with an alias, I didn't have any ERROR or WARNING outcome.

Rajeshreeputra made their first commit to this issue’s fork.

rajeshreeputra’s picture

This fixes coding standards

  • Rajeshreeputra committed 5c016a8 on 3.x
    Issue #2886457 by Rajeshreeputra, jayesh_makwana, Ruturaj Chaubey,...
rajeshreeputra’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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