Fix the issues reported by phpcs

Created on 6 July 2023, over 1 year ago
Updated 24 August 2023, about 1 year ago

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 random_quotes

Proposed resolution

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

FILE: /var/www/html/vb/d_cont/random_quotes_block/README.md
------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
------------------------------------------------------------------------
 14 | WARNING | [ ] Line exceeds 80 characters; contains 247 characters
 32 | ERROR   | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------


FILE: /var/www/html/vb/d_cont/random_quotes_block/random_quotes_block.module
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found
    |       |     "\r\n"
 24 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------


FILE: ..._cont/random_quotes_block/config/install/node.type.random_quotes_block.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 13 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------


FILE: ...nfig/install/core.entity_view_display.node.random_quotes_block.default.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 23 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------


FILE: ...nfig/install/core.entity_form_display.node.random_quotes_block.default.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 23 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------


FILE: ...onfig/install/core.entity_view_display.node.random_quotes_block.teaser.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 25 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------


FILE: ...cont/random_quotes_block/config/install/views.view.random_quotes_block.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 275 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------


FILE: ..._quotes_block/config/install/field.field.node.random_quotes_block.body.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 21 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
๐Ÿ“Œ Task
Status

RTBC

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia urvashi_vora Madhya Pradesh, India

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

  • Issue created by @urvashi_vora
  • Hii, @urvashi_vora I have Review your patch.

    These are the steps I followed:

    1. Took clone from git version 1.0.x in drupal 10.1.x

    2. Applied patch and ran this command:

    ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,m
    d,yml,twig modules/contrib/random_quotes_block/

    But I found errors.

    3. I have fixed that error with phpcbf.

    Ran this command to fix the errors:

    ./vendor/bin/phpcbf --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,m
    d,yml,twig modules/contrib/random_quotes_block/

    4. Then again checked with phpcs:

    ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,m
    d,yml,twig modules/contrib/random_quotes_block/

    Found no errors.

    Please review this.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia akshay.singh Noida

    akshay.singh โ†’ made their first commit to this issueโ€™s fork.

  • Assigned to akshay.singh
  • Status changed to Needs work about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia akshay.singh Noida
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia akshay.singh Noida

    hello @satish_kumar,

    there is no need to attach the screenshots and again the patch which was attached for review.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia akshay.singh Noida
  • @akshaysingh opened merge request.
  • Issue was unassigned.
  • Status changed to RTBC about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia akshay.singh Noida

    Created an MR with the fixes

    +1 for RTBC

    Thanks

Production build 0.71.5 2024