Requires drupal coding standards

Issue fork maxlength-2807841

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

minakshiPh created an issue. See original summary.

minakshiPh’s picture

Assigned: minakshiPh » Unassigned
Status: Active » Needs review
StatusFileSize
new8.49 KB

Added the patch with fix.

Kindly review.
Thanks!

Status: Needs review » Needs work

The last submitted patch, 2: drupal-coding-std-2807841-2.patch, failed testing.

The last submitted patch, 2: drupal-coding-std-2807841-2.patch, failed testing.

The last submitted patch, 2: drupal-coding-std-2807841-2.patch, failed testing.

The last submitted patch, 2: drupal-coding-std-2807841-2.patch, failed testing.

The last submitted patch, 2: drupal-coding-std-2807841-2.patch, failed testing.

The last submitted patch, 2: drupal-coding-std-2807841-2.patch, failed testing.

dawehner’s picture

These changes doesn't look like an automated fix using phpcbf, please add a phpcs file + execute phpcbf.

minakshiPh’s picture

Status: Needs work » Needs review
StatusFileSize
new5.47 KB
new4.92 KB

Hi @dawehner,

Thanks for reviewing my patch !!!
Added the new patch with modifications as mentioned in #9.

Kindly review.
Thanks!

amit.drupal’s picture

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

Some more code cleanup required.

amit.drupal’s picture

amit.drupal’s picture

StatusFileSize
new4.05 KB
amit.drupal’s picture

StatusFileSize
new6.33 KB
new1.71 KB

Added the new patch i think it's helpful.

amit.drupal’s picture

Status: Needs work » Needs review
amit.drupal’s picture

Please suggest how to fix coding standards in Javascript file use in drupal modules.

dawehner’s picture

Status: Needs review » Needs work

Please use a phpcr configuration file so we can automate those checks. When you fix a rule then, you could add those rules, see the latest commit I made:
http://drupalcode.org/maxlength/commit/?id=64fbed4

larowlan’s picture

Category: Support request » Bug report
kkmitra’s picture

StatusFileSize
new11.48 KB

Fixed Drupal coding standards.

akashkumar07’s picture

Status: Needs work » Needs review
Deepthi kumari’s picture

StatusFileSize
new14.88 KB

Could not apply patch #19. Applied new patch fixing all the drupal coding standards.
Please review.

cedewey’s picture

Status: Needs review » Needs work

Applying the patch failed for me with the latest version of 8.x-1.x

Here are the results,

Hunk #1 FAILED at 1.
Hunk #12 succeeded at 292 (offset 3 lines).
Hunk #13 succeeded at 304 (offset 3 lines).
Hunk #14 succeeded at 356 (offset 3 lines).
1 out of 14 hunks FAILED -- saving rejects to file js/maxlength.js.rej
patching file maxlength.services.yml
patching file src/WidgetSettings.php
patching file src/WidgetSettingsInterface.php
sourabhjain’s picture

Assigned: Unassigned » sourabhjain

Working on this.

sourabhjain’s picture

Assigned: sourabhjain » Unassigned
Status: Needs work » Needs review
StatusFileSize
new11.4 KB

Resolved the coding standard issue and its successfully applying for 8.x-1.x version. Please review.

cedewey’s picture

Status: Needs review » Needs work

Hi Sourabh,

Thank you for working on this.

Excellent, the patch now applies cleanly for me too.

A few small notes,

  1. Changing this comment to

    "Limits the number of characters in textfields and textareas and shows the.

    Amount of characters left."

    Introduces grammar issues. I think it should be left as is, unless you have another suggestion to minimize the character length per line while maintaining proper grammar and readability.

  2. Let's reword "@todo: Check if all them work" to "@todo Check if they all work."
  3. Why did you remove the "@param $cache" comment? It seems that might be helpful to keep in.

The rest looks good as far as I can tell, though I'll have another maintainer with more coding experience do a final pass.

Thanks again for working on this.

sourabhjain’s picture

Assigned: Unassigned » sourabhjain

Thanks Cadewey.
I am working on this.

sourabhjain’s picture

Assigned: sourabhjain » Unassigned
Status: Needs work » Needs review
StatusFileSize
new11.39 KB
new658 bytes

Hi Cadewey

I have fixed the first two suggestions provided by you but regarding the 3rd suggestion when I am trying to write the '@param $cache' it is generating some more PHPCS issues
Hook implementations should not duplicate @param documentation

So when I investigated it I have found that in the hook we don't need to define @param. Everything is already defined in the definition.

Could you please review it and let me know if I still need to add @param $cache?

Thanks

cedewey’s picture

Status: Needs review » Reviewed & tested by the community

Sourabh,

This looks great. Thank you very much for working on this.

I'm marking it Reviewed and Tested by the Community. As mentioned before, a more senior developer will do one more review before committing it to the 8.x-1.x branch.

cedewey’s picture

Version: 8.x-1.0-beta1 » 2.0.x-dev
hipp2bsquare’s picture

Unfortunately, 3 of 4 hunks now fail when attempting to apply this to the head of 2.0.x. I had it on my list to check for coding standards prior to the RC2 release, anyways. Will update this ticket with more info soon.

hipp2bsquare’s picture

Assigned: Unassigned » cedewey
Status: Reviewed & tested by the community » Needs review

Clayton, I updated the codebase to reflect coding standards. Please review my merge request.

cedewey’s picture

Status: Needs review » Reviewed & tested by the community

This looks good on my end. Marking RTBC.

cedewey’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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