Fix the warnings/errors reported by PHP_CodeSniffer

Created on 6 July 2023, over 1 year ago

Problem/Motivation

FILE: /home/lenovo/druapl7to9/web/modules/contrib/config_ignore_auto/config_ignore_auto.module
-----------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------------
   1 | ERROR | [x] Missing file doc comment
  14 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 112 | ERROR | [x] Expected 1 blank line after function; 2 found
-----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/druapl7to9/web/modules/contrib/config_ignore_auto/src/Form/Settings.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
 9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
   |       |     Symfony\Component\DependencyInjection\ContainerInterface.
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/druapl7to9/web/modules/contrib/config_ignore_auto/README.txt
-------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------
 30 | ERROR | [x] Expected 1 newline at end of file; 2 found
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------

Time: 81ms; Memory: 10MB

Steps to reproduce

Execute Command : phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig config_ignore_auto/

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia roshni27

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 @roshni27
  • Merge request !2fixes-phpcs-errors โ†’ (Open) created by roshni27
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia roshni27

    I have solved phpcs issues except one . Please review MR .

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    silvi.addweb โ†’ made their first commit to this issueโ€™s fork.

  • Status changed to Needs work 6 months ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines clarkssquared

    Hi

    I applied the updated MR !2 and I can see that there's a PHPCS warning about Translatable String that the PHPCS reported

    โžœ  contrib git:(master) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml config_ignore_auto
    
    FILE: ...9-local/web/modules/contrib/config_ignore_auto/config_ignore_auto.info.yml
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     1 | WARNING | Remove "project" from the info file, it will be added by
       |         | drupal.org packaging automatically
     1 | WARNING | Remove "datestamp" from the info file, it will be added by
       |         | drupal.org packaging automatically
     1 | WARNING | Remove "version" from the info file, it will be added by
       |         | drupal.org packaging automatically
    --------------------------------------------------------------------------------
    
    
    FILE: ...s/d9/d9-local/web/modules/contrib/config_ignore_auto/src/Form/Settings.php
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     96 | WARNING | Translatable strings must not begin or end with white spaces,
        |         | use placeholders with t() for variables
    --------------------------------------------------------------------------------
    
    Time: 244ms; Memory: 10MB
    
    โžœ  contrib git:(master) โœ— 
    
  • Status changed to Closed: won't fix about 1 month ago
  • ๐Ÿ‡ฆ๐Ÿ‡ทArgentina hanoii ๐Ÿ‡ฆ๐Ÿ‡ทUTC-3

    I fixed this for 3.x, 2.x will likely receive no further update unless security issues arises.

Production build 0.71.5 2024