Coding standards issue

Created on 3 January 2025, about 2 months ago

Problem/Motivation

FILE: ...recombee/js/recombee.properties.js
---------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------
67 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------

FILE: ...recombee/js/recombee.tracker.js
------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
45 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------

FILE: ...recombee/js/recombee.public_scenario.js
--------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------
41 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
45 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------

Time: 194ms; Memory: 10MB

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

šŸ‡ØšŸ‡“Colombia kinyein

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

Merge Requests

Comments & Activities

  • Issue created by @kinyein
  • Merge request !7Coding standards fix ā†’ (Open) created by kinyein
  • šŸ‡ØšŸ‡“Colombia kinyein

    Hi, I made a merge request to fix the coding standards issue in this module, I hope it can be reviewed soon.

  • Pipeline finished with Success
    about 2 months ago
    Total: 307s
    #385257
  • šŸ‡µšŸ‡­Philippines paraderojether

    Hi kinyein,

    I reviewed MR!7, and confirmed it passed the phpcs using Gitlab CI. However there are still phpcs issues reported using the PHP_CodeSniffer.

    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig recombee
    
    FILE: ...rs/jetherparadero/Q1/q1contributions/web/modules/contrib/recombee/src/Form/SettingsForm.php
    -------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
    -------------------------------------------------------------------------------------------------
      44 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      45 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      50 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      51 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      96 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     102 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     118 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    -------------------------------------------------------------------------------------------------
    
    
    FILE: ...Q1/q1contributions/web/modules/contrib/recombee/src/Plugin/Block/RecombeePublicScenario.php
    -------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------
     131 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    -------------------------------------------------------------------------------------------------
    
    Time: 165ms; Memory: 10MB

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

    Kindly check and advise, please.
    Thank you.

  • First commit to issue fork.
  • Pipeline finished with Success
    about 2 months ago
    Total: 206s
    #388212
  • šŸ‡®šŸ‡³India abhiyanshu

    Fixed the remaining coding standard issues.
    Please refer to the attached screenshot for more clarity. Thank you.

  • šŸ‡µšŸ‡­Philippines paraderojether

    Hi

    I reviewed MR!7 again and confirmed it passed the phpcs using Gitlab CI and PHP_CodeSniffer.

    āžœ  recombee git:(2.0.x) curl https://git.drupalcode.org/project/recombee/-/merge_requests/7.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  4790    0  4790    0     0  10822      0 --:--:-- --:--:-- --:--:-- 10961
    patching file 'js/recombee.properties.js'
    patching file 'js/recombee.public_scenario.js'
    patching file 'js/recombee.tracker.js'
    patching file 'src/Form/SettingsForm.php'
    patching file 'src/Plugin/Block/RecombeePublicScenario.php'
    āžœ  recombee 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 recombee
    āžœ  contrib git:(main) āœ—

    Moving this to RTBC.
    Thank you.

Production build 0.71.5 2024