Compatibility with coding standards

Created on 15 February 2024, 10 months ago
Updated 18 September 2024, 3 months ago

Problem/Motivation

The module must be compatible with Drupal development standards and best practices.
In views_filters_summary.txt you can find the phpcs command dump for Drupal standards.
Best practices are respected.

Proposed resolution

Most fixes can be applied via the phpcbf command. However, there are still some fixes that need to be applied manually.

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇷🇪Réunion morgannc La Réunion

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 @morgannc
  • Issue was unassigned.
  • Status changed to Needs review 10 months ago
  • 🇷🇪Réunion morgannc La Réunion
  • Pipeline finished with Success
    10 months ago
    Total: 195s
    #95899
  • 🇷🇪Réunion morgannc La Réunion
  • 🇷🇪Réunion morgannc La Réunion

    Can someone review this small Pull Request ?
    There is not big changes ..

  • Status changed to RTBC 8 months ago
  • Reviewed by running
    phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml views_filters_summary against this branch.

    Confirmed no issues found. Moving to RTBC.

  • Status changed to Needs review 8 months ago
  • Updated MR to fix eslint issues in addition to phpcs.

    Moving back to Needs Review.

  • Status changed to Needs work 4 months ago
  • Hi @mdranove,

    Applied the latest changes on MR!21 successfully, however, there are errors reported. Please see below:

    views_filters_summary git:(2.0.x) curl https://git.drupalcode.org/project/views_filters_summary/-/merge_requests/21.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 12957    0 12957    0     0  23361      0 --:--:-- --:--:-- --:--:-- 23774
    patching file README.txt
    patching file css/views_filters_summary.css
    patching file js/views-filters-summary.js
    patching file src/Plugin/views/area/ViewsFiltersSummary.php
    patching file views_filters_summary.module
    ➜  views_filters_summary git:(2.0.x) ✗ ..
    ➜  contrib git:(main) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig views_filters_summary
    
    FILE: ...ontrib/views_filters_summary/src/Plugin/views/area/ViewsFiltersSummary.php
    --------------------------------------------------------------------------------
    FOUND 6 ERRORS AFFECTING 6 LINES
    --------------------------------------------------------------------------------
      70 | ERROR | [x] Multi-line function declarations must have a trailing comma
         |       |     after the last parameter
      85 | ERROR | [x] Multi-line function declarations must have a trailing comma
         |       |     after the last parameter
     129 | ERROR | [x] Multi-line function declarations must have a trailing comma
         |       |     after the last parameter
     344 | ERROR | [x] Multi-line function declarations must have a trailing comma
         |       |     after the last parameter
     380 | ERROR | [x] Multi-line function declarations must have a trailing comma
         |       |     after the last parameter
     609 | ERROR | [x] Multi-line function declarations must have a trailing comma
         |       |     after the last parameter
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    Time: 283ms; Memory: 14MB

    Kindly check

    Thanks,
    Jake

  • Assigned to akshaydalvi212
  • 🇮🇳India akshaydalvi212

    I will remove the remaining phpcs errors.

  • Issue was unassigned.
  • Status changed to Needs review 4 months ago
  • Status changed to RTBC 4 months ago
  • Hi @akshaydalvi212,

    Applied the latest changes you committed on MR!21, confirmed it resolved phpcs errors/warnings reported.

    views_filters_summary git:(2.0.x) curl https://git.drupalcode.org/project/views_filters_summary/-/merge_requests/21.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 14684    0 14684    0     0  35104      0 --:--:-- --:--:-- --:--:-- 36167
    patching file README.txt
    patching file css/views_filters_summary.css
    patching file js/views-filters-summary.js
    patching file src/Plugin/views/area/ViewsFiltersSummary.php
    patching file views_filters_summary.module
    ➜  views_filters_summary git:(2.0.x) ✗ ..
    ➜  contrib git:(main) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig views_filters_summary
    ➜  contrib git:(main) ✗

    Will now move this to RTBC

    Thanks,
    Jake

  • Status changed to Fixed 3 months ago
  • 🇫🇷France mably

    Should be fixed in 3.0.x-dev branch.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024