Coding standard issues

Created on 8 November 2024, about 1 month ago

Problem/Motivation

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

FILE: .../web/modules/custom/dblog_ban/README.md
-------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 142 characters
-------------------------------------------------------------------------

FILE: .../web/modules/custom/dblog_ban/src/Form/BanUnbanConfirmFormBase.php
--------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
| | Drupal\ban\BanIpManagerInterface.
--------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/dblog_ban/src/Controller/IpBanUnbanController.php
--------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
| | Drupal\ban\BanIpManagerInterface.
--------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/dblog_ban/CHANGELOG.txt
-----------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
-----------------------------------------------------------------------------
140 | WARNING | Line exceeds 80 characters; contains 87 characters
141 | WARNING | Line exceeds 80 characters; contains 195 characters
142 | WARNING | Line exceeds 80 characters; contains 91 characters
143 | WARNING | Line exceeds 80 characters; contains 95 characters
150 | WARNING | Line exceeds 80 characters; contains 82 characters
151 | WARNING | Line exceeds 80 characters; contains 101 characters
-----------------------------------------------------------------------------

FILE: .../web/modules/custom/dblog_ban/tests/modules/dblog_ban_test/dblog_ban_test.info.yml
--------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging
| | automatically
--------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/dblog_ban/tests/src/Unit/RouteProcessorCsrfAjaxTest.php
--------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
| | Drupal\dblog_ban\Services\RouteProcessorCsrfAjax.
--------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------

Steps to reproduce

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

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Active

Version

2.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
  • Merge request !8Coding standard issues - #3486446 ā†’ (Open) created by alyaj2a
  • Pipeline finished with Success
    about 1 month ago
    Total: 416s
    #333521
  • šŸ‡µšŸ‡­Philippines paraderojether

    Hi

    I reviewed MR!8, applied it against the Database logging ban operation 2.0.x and confirmed it fixes the issues reported by PHP_CodeSniffer.

    dblog_ban git:(2.0.x) curl https://git.drupalcode.org/project/dblog_ban/-/merge_requests/8.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  5137    0  5137    0     0  12003      0 --:--:-- --:--:-- --:--:-- 12201
    patching file CHANGELOG.txt
    patching file README.md
    patching file 'src/Controller/IpBanUnbanController.php'
    patching file 'src/Form/BanUnbanConfirmFormBase.php'
    patching file 'tests/modules/dblog_ban_test/dblog_ban_test.info.yml'
    patching file 'tests/src/Unit/RouteProcessorCsrfAjaxTest.php'
    āžœ  dblog_ban git:(2.0.x) āœ— cd ..
    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig dblog_ban
    āžœ  contrib git:(main) āœ—

    However, it display phpcs issues on the Gitlab CI

    Kindly check and advise, please.
    Thank you.

  • šŸ‡®šŸ‡³India divyansh.gupta Jaipur

    I am working on it.

  • Pipeline finished with Success
    26 days ago
    Total: 212s
    #351699
  • šŸ‡®šŸ‡³India divyansh.gupta Jaipur
  • šŸ‡µšŸ‡­Philippines paraderojether

    Hi divyansh.gupta,

    I double checked MR!8 and this is now passed on the Gitlab CI

    Moving this to RTBC.
    Thank you.

Production build 0.71.5 2024