Coding standards issues

Created on 6 December 2024, 12 days ago

Problem/Motivation

Currently, the module contains inconsistencies in code formatting that do not adhere to the Drupal Coding Standards (Drupal Coding Standards and DrupalPractice). These inconsistencies make the code less readable and can create challenges during code review, in addition to impacting long-term maintainability.

The motivation for this issue is to align the module's code with the recommended standards, making it easier for the community to contribute and ensuring the code is clearer, more maintainable, and compatible with static analysis tools.

By implementing these changes, the module will better align with the Drupal communityโ€™s policies, and the effort required for future updates or reviews will be reduced.

Steps to reproduce

  1. Clone the repo
  2. cd svg_image_field
  3. run phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css .

Proposed resolution

Fix reported errors and warnings

FILE                                                  ERRORS  WARNINGS
----------------------------------------------------------------------
...b/modules/contrib/svg_image_field/CONTRIBUTING.md  0       7
/app/web/modules/contrib/svg_image_field/README.md    1       0
----------------------------------------------------------------------
A TOTAL OF 1 ERROR AND 7 WARNINGS WERE FOUND IN 2 FILES

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Active

Version

2.3

Component

Code

Created by

๐Ÿ‡จ๐Ÿ‡ดColombia ismaelromero Somewhere in the exotic Colombia

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

Merge Requests

Comments & Activities

  • Issue created by @ismaelromero
  • Merge request !34Fix coding standards issues โ†’ (Open) created by ismaelromero
  • ๐Ÿ‡จ๐Ÿ‡ดColombia ismaelromero Somewhere in the exotic Colombia

    I've made some changes, waiting for a review.

    Thanks

  • Pipeline finished with Failed
    12 days ago
    Total: 215s
    #361314
  • Hi @ismaelromero,

    I have applied the commits you made on MR !34 and confirmed it fixed all reported issues.

    svg_image_field git:(2.3.x) curl https://git.drupalcode.org/project/svg_image_field/-/merge_requests/34.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  2504    0  2504    0     0   6202      0 --:--:-- --:--:-- --:--:--  6387
    patching file CONTRIBUTING.md
    patching file README.md
    โžœ  svg_image_field git:(2.3.x) โœ— ..
    โžœ  contrib git:(main) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig svg_image_field
    โžœ  contrib git:(main) โœ—

    Will now move this to RTBC

    Thanks,
    Jake

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    Since GitLab CI is enabled for all the projects, it should be used to get the list of the PHP_CodeSniffer warnings/errors to fix.

Production build 0.71.5 2024