Problem/Motivation

Missing coding standards

Steps to reproduce

Run the command:

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml autogrow_textarea

Proposed resolution

Fix the following coding standards issues and create an MR with fixes.

FILE: autogrow_textarea/README.md
-----------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------
  5 | WARNING | Line exceeds 80 characters; contains 177 characters
 21 | WARNING | Line exceeds 80 characters; contains 197 characters
-----------------------------------------------------------------------------


FILE: autogrow_textarea/autogrow_textarea.module
--------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
 1 | ERROR | [x] Missing file doc comment
--------------------------------------------------------------------------------------------
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

sonam_sharma created an issue. See original summary.

sonam_sharma’s picture

Title: Remove "project","datestamp","version" from the info file » Fix the issues reported by phpcs
Issue summary: View changes
sonam_sharma’s picture

StatusFileSize
new286 bytes
sonam_sharma’s picture

Issue summary: View changes
StatusFileSize
new1.45 KB
clarkssquared’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new37.73 KB

Hi sonam_sharma

I applied your patch #4 to my local and I confirmed that your patch fixed all the PHPCS errors/issues of the module.

please look at the screenshot I attached for your reference

Thank you

sonam_sharma’s picture

Thank You! @clarkssquared

avpaderno’s picture

Category: Bug report » Task
Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs issue summary update

The issue summary should always describe what the issue is trying to fix and, in the case of coding standards issues, show which command and arguments have been used and which report that command shown. In this way, project maintainers can verify the patch/MR fixes all the warnings/errors.

imustakim’s picture

Issue summary: View changes
Status: Needs work » Needs review
Issue tags: -Needs issue summary update +Coding standards

Issue summary updated.

aayushmankotia’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new192.59 KB

Hi,

I conducted a test by implementing patch #4 and executing the following command ../../../vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml ../autogrow_textarea/

After thorough examination, I did not found any errors. Therefore, I am changing the status to RTBC. Screenshot is attached for your reference.

ss

akshay.singh made their first commit to this issue’s fork.

akshay.singh’s picture

Assigned: Unassigned » akshay.singh
Status: Reviewed & tested by the community » Needs work

addressing #7

akshay.singh’s picture

Issue summary: View changes
akshay.singh’s picture

+/**
+ * @file
+ * Module autogrow_textarea.
+ */

this is not the right info for the file.

/**
 * Implements hook_element_info_alter().
 *
 * Adds autogrow_textarea.js as attached JavaScript to each textarea.
 */

these are the generic hooks not specific to piece of code, one shouldn't add this in function doc it must be added as commenting.

new_3374628.patch

this is the right naming convention for a patch.

akshay.singh’s picture

Assigned: akshay.singh » Unassigned
Status: Needs work » Needs review

All points incorporated.

Please review.

Thanks

avpaderno’s picture

Status: Needs review » Needs work
akshay.singh’s picture

Status: Needs work » Needs review
avpaderno’s picture

Status: Needs review » Needs work
nitin_lama’s picture

Assigned: Unassigned » nitin_lama
nitin_lama’s picture

Assigned: nitin_lama » Unassigned
Status: Needs work » Needs review

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

robloach’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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