Fix the issues reported by phpcs

Created on 22 March 2023, over 1 year ago
Updated 20 August 2024, 3 months ago

Problem/Motivation

Getting following error/warnings.

FILE: /var/www/html/modules/contrib/disable_user_view/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
2 | WARNING | Line exceeds 80 characters; contains 93 characters
4 | WARNING | Line exceeds 80 characters; contains 106 characters
----------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/disable_user_view/disable_user_view.services.yml
------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------

Time: 428ms; Memory: 6MB

Steps to reproduce

Run following command

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

Proposed resolution

Above error/warnings need to be fixed.

šŸ“Œ Task
Status

Closed: outdated

Version

2.0

Component

Code

Created by

šŸ‡®šŸ‡³India samit.310@gmail.com

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

Merge Requests

Comments & Activities

  • Issue created by @samit.310@gmail.com
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • šŸ‡®šŸ‡³India samit.310@gmail.com

    Above errors/warnings has been fixed.

  • šŸ‡®šŸ‡³India rajneeshb New Delhi

    Reviewed patch #2 reported coding standard issue fixed. Attaching SS for reference.

  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • Status changed to RTBC 3 months ago
  • Hi @everyone,

    Applied the patch that was provided on comments #2, confirmed it fixed the errors reported. Please see below:

    āžœ  disable_user_view git:(2.0.x) curl https://www.drupal.org/files/issues/2023-03-22/3349517-2.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  1003  100  1003    0     0   2650      0 --:--:-- --:--:-- --:--:--  2725
    patching file README.md
    patching file disable_user_view.services.yml
    āžœ  disable_user_view git:(2.0.x) āœ— ..
    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig disable_user_view
    āžœ  contrib git:(main) āœ—

    Will now move this to RTBC

    Thanks,
    Jake

  • Status changed to Needs work 3 months ago
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    Let's create a merge request, now that patches are no longer tested.

  • Pipeline finished with Success
    3 months ago
    Total: 130s
    #259580
  • Status changed to Closed: outdated 3 months ago
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    Actually, no PHP_CodeSniffer errors/warnings are reported before even changing any line.

Production build 0.71.5 2024