Coding Standard Issues

Created on 5 September 2024, about 1 month ago
Updated 11 September 2024, about 1 month ago

Problem/Motivation

Drupal Coding standards should be fixed.

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

FILE: ...ome/aly/www/contribuciones/web/modules/custom/view_password/config/schema/view_password.schema.yml
--------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------
16 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------

FILE: .../aly/www/contribuciones/web/modules/custom/view_password/config/install/view_password.settings.yml
--------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------
4 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/view_password/view_password.module
--------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------
51 | ERROR | [x] Inline comments must start with a capital letter
51 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or
| | closing parentheses
56 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
--------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/view_password/README.md
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
49 | ERROR | [x] Expected 1 newline at end of file; 2 found
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------

FILE: .../web/modules/custom/view_password/src/Form/PasswordSettingsForm.php
--------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AND 2 WARNINGS AFFECTING 8 LINES
--------------------------------------------------------------------------------------------------------
49 | WARNING | [ ] Only string literals should be passed to t() where possible
50 | ERROR | [x] Short array syntax must be used to define arrays
50 | ERROR | [ ] The array declaration extends to column 97 (the limit is 80). The array content
| | should be split up over multiple lines
57 | WARNING | [ ] Only string literals should be passed to t() where possible
58 | ERROR | [x] Short array syntax must be used to define arrays
58 | ERROR | [ ] The array declaration extends to column 90 (the limit is 80). The array content
| | should be split up over multiple lines
100 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
107 | ERROR | [x] Expected 1 blank line after function; 2 found
117 | ERROR | [x] Expected 1 blank line after function; 2 found
120 | ERROR | [x] The closing brace for the class must have an empty line before it
--------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/view_password/view_password.libraries.yml
-----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------
15 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/view_password/CHANGELOG.txt
---------------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
---------------------------------------------------------------------------------
5 | WARNING | Line exceeds 80 characters; contains 90 characters
7 | WARNING | Line exceeds 80 characters; contains 99 characters
16 | WARNING | Line exceeds 80 characters; contains 128 characters
25 | WARNING | Line exceeds 80 characters; contains 113 characters
26 | WARNING | Line exceeds 80 characters; contains 98 characters
27 | WARNING | Line exceeds 80 characters; contains 109 characters
---------------------------------------------------------------------------------

Steps to reproduce

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

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Needs review

Version

6.0

Component

Code

Created by

šŸ‡µšŸ‡ŖPeru alyaj2a

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @alyaj2a
  • Assigned to dharmeshbarot89
  • Issue was unassigned.
  • Needs review,
    created MR for resolving phpcs issues.

  • Status changed to Needs review about 1 month ago
  • Status changed to Needs work about 1 month ago
  • šŸ‡µšŸ‡­Philippines paraderojether

    Hi dharmeshbarot89,

    I reviewed MR!22, and there is still 1 warning remaining shown below:

    āžœ  view_password git:(6.0.x) curl https://git.drupalcode.org/project/view_password/-/merge_requests/22.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  7774    0  7774    0     0   4335      0 --:--:--  0:00:01 --:--:--  4350
    patching file CHANGELOG.txt
    patching file README.md
    patching file 'config/install/view_password.settings.yml'
    patching file 'config/schema/view_password.schema.yml'
    patching file 'src/Form/PasswordSettingsForm.php'
    patching file view_password.libraries.yml
    patching file view_password.module
    āžœ  view_password git:(6.0.x) āœ— cd ..
    āžœ  contrib git:(1.0.0) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig view_password
    
    FILE: /Users/jetherparadero/Contributions/recommended-project/web/modules/contrib/view_password/src/Form/PasswordSettingsForm.php
    ---------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------
     45 | WARNING | Unused variable $trailing_slash_message.
    ---------------------------------------------------------------------------------------------------------------------------------
    
    Time: 116ms; Memory: 10MB
    

    Thank you.

  • Assigned to Amit.Rawat777
  • šŸ‡®šŸ‡³India Amit.Rawat777

    working on it

  • Issue was unassigned.
  • Status changed to Needs review about 1 month ago
  • šŸ‡®šŸ‡³India Amit.Rawat777

    I have fixed the remaining issues

Production build 0.71.5 2024