Coding Standard issues

Created on 12 June 2017, about 7 years ago
Updated 31 July 2024, about 1 month ago

There are some coding standard issues in module.

šŸ“Œ Task
Status

RTBC

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India jayesh_makwana

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

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Hi @Deepthi kumari,

    I applied the patch you provided, it was applied successfully, however, there are still errors that were reported. Please see below:

    tideways git:(8.x-1.x) curl https://www.drupal.org/files/issues/2020-03-12/tideways-codingstandard-2885376-4.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  9030  100  9030    0     0  29420      0 --:--:-- --:--:-- --:--:-- 30506
    patching file src/Install.php
    patching file src/StackMiddleWare/Tideways.php
    patching file tideways.services.yml
    āžœ  tideways git:(8.x-1.x) āœ— cd ..
    āžœ  contrib git:(master) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig tideways
    
    FILE: ...site/drupal-orgissue-v9/web/modules/contrib/tideways/tideways.services.yml
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     8 | ERROR | [x] Expected 1 newline at end of file; 3 found
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...Demo-site/drupal-orgissue-v9/web/modules/contrib/tideways/tideways.install
    --------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    --------------------------------------------------------------------------------
      1 | ERROR | [x] Missing file doc comment
     10 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced
        |       |     with use statements
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...emo-site/drupal-orgissue-v9/web/modules/contrib/tideways/tideways.info.yml
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    --------------------------------------------------------------------------------
     1 | WARNING | [ ] "core_version_requirement" property is missing in the
       |         |     info.yml file
     5 | ERROR   | [x] Expected 1 newline at end of file; 0 found
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: .../Demo-site/drupal-orgissue-v9/web/modules/contrib/tideways/src/Install.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    --------------------------------------------------------------------------------
      6 | ERROR   | [x] Use statements should be sorted alphabetically. The first
        |         |     wrong one is
        |         |     Drupal\Core\StringTranslation\StringTranslationTrait.
     10 | WARNING | [ ] The class short comment should describe what the class does
        |         |     and not simply repeat the class name
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: ...-orgissue-v9/web/modules/contrib/tideways/src/StackMiddleWare/Tideways.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     6 | ERROR | [x] Use statements should be sorted alphabetically. The first
       |       |     wrong one is Drupal\Core\Site\Settings.
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    Time: 160ms; Memory: 10MB

    Kindly check

    Thanks,
    Jake

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

    Hi,

    I provided a patch for the issues mentioned in #5.

    Please review. Thank you.

  • Status changed to RTBC about 1 month ago
  • Hi @cleavinjosh,

    The patch you provided confirmed fixed all errors reported.

    tideways git:(8.x-1.x) āœ— curl https://www.drupal.org/files/issues/2024-07-30/tideways-codingstandards-2885376-6.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 10703  100 10703    0     0  56028      0 --:--:-- --:--:-- --:--:-- 59461
    patching file src/Install.php
    patching file src/StackMiddleWare/Tideways.php
    patching file tideways.info.yml
    patching file tideways.install
    patching file tideways.services.yml
    āžœ  tideways git:(8.x-1.x) āœ— cd ..
    āžœ  contrib git:(master) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig tideways
    āžœ  contrib git:(master) āœ—

    Will now move this to RTBC

    Thanks.
    Jake

Production build 0.71.5 2024