- Issue created by @himanshu_jhaloya
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 9:28am 8 May 2023 - Status changed to Needs work
4 months ago 11:58am 11 July 2024 - 🇵ðŸ‡Philippines cleavinjosh
Hi @himanshu_jhaloya,
I applied MR!1 and it was applied smoothly. However, I still encountered some issues after I ran
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml
.➜ gmv git:(1.0.x) curl https://git.drupalcode.org/project/gmv/-/merge_requests/1.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 11829 0 11829 0 0 27115 0 --:--:-- --:--:-- --:--:-- 27130 patching file README.md patching file gmv.info.yml patching file gmv.libraries.yml patching file gmv.module patching file src/Plugin/Field/FieldFormatter/ThreeDeeObjectFieldFormatter.php patching file src/Plugin/Field/FieldType/ThreeDeeObject.php patching file src/Plugin/Field/FieldWidget/ThreeDeeObjectWidget.php ➜ gmv git:(1.0.x) ✗ .. ➜ contrib git:(main) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml gmv FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/gmv/src/Plugin/Field/FieldType/ThreeDeeObject.php ----------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------------- 8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface. ----------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/gmv/src/Plugin/Field/FieldFormatter/ThreeDeeObjectFieldFormatter.php ----------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------------------------- 8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\EntityTypeManagerInterface. ----------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------------------------------------------- Time: 174ms; Memory: 10MB ➜ contrib git:(main) ✗
- 🇮🇹Italy apaderno Brescia, 🇮🇹
There are still two PHP_CodeSniffer errors to fix.
FILE: ...b/modules/custom/gmv-3358798/src/Plugin/Field/FieldType/ThreeDeeObject.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 8 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Core\Form\FormStateInterface. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...v-3358798/src/Plugin/Field/FieldFormatter/ThreeDeeObjectFieldFormatter.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 8 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Core\Entity\EntityTypeManagerInterface. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- Time: 166ms; Memory: 6MB
- Status changed to Needs review
4 months ago 1:28pm 11 July 2024 - 🇮🇹Italy apaderno Brescia, 🇮🇹
- Assigned to amanbtr72
- Status changed to Needs work
4 months ago 7:17am 12 July 2024 - 🇮🇳India amanbtr72
Reviewed the MR 3 Still found some errors
$ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml .
FILE: D:\wamp64\www\drupal10\modules\custom\doissues\gmv-3358798\gmv.module
--------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
3 | ERROR | Missing short description in doc comment
10 | ERROR | Doc comment short description must end with a full stop
12 | ERROR | The array declaration extends to column 150 (the limit is 120).
| | The array content should be split up over multiple lines
12 | ERROR | The array declaration extends to column 149 (the limit is 120).
| | The array content should be split up over multiple lines
12 | ERROR | The array declaration extends to column 148 (the limit is 120).
| | The array content should be split up over multiple lines
--------------------------------------------------------------------------------FILE: D:\wamp64\www\drupal10\modules\custom\doissues\gmv-3358798\README.md
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 87 characters
4 | WARNING | Line exceeds 80 characters; contains 107 characters
7 | WARNING | Line exceeds 80 characters; contains 132 characters
--------------------------------------------------------------------------FILE: ...v-3358798\src\Plugin\Field\FieldFormatter\ThreeDeeObjectFieldFormatter.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
62 | WARNING | File::load calls should be avoided in classes, use dependency
| | injection instead
67 | WARNING | \Drupal calls should be avoided in classes, use dependency
| | injection instead
72 | WARNING | File::load calls should be avoided in classes, use dependency
| | injection instead
73 | WARNING | \Drupal calls should be avoided in classes, use dependency
| | injection instead
--------------------------------------------------------------------------------Time: 852ms; Memory: 12MB
- Issue was unassigned.
- Status changed to Needs review
4 months ago 7:22am 12 July 2024 - Status changed to Needs work
4 months ago 10:16am 12 July 2024 - 🇮🇳India bhaveshdas
I applied MR!3 and I still encountered some issues after I ran vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig modules/custom/gmv-3358798/
FILE: /var/www/html/drupal-contri-d10/modules/custom/gmv-3358798/gmv.module --------------------------------------------------------------------------- FOUND 3 ERRORS AFFECTING 3 LINES --------------------------------------------------------------------------- 10 | ERROR | [x] There must be no blank lines after the function comment 14 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 28 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 --------------------------------------------------------------------------- PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------- Time: 138ms; Memory: 10MB
- Status changed to Needs review
4 months ago 10:23am 12 July 2024 - 🇮🇳India bhaveshdas
I have fixed remaining issues on this 9be7c077 ticket could you please review it.
Thankyou !
- 🇮🇹Italy apaderno Brescia, 🇮🇹
The MR to review was MR !1, which already fixed all the issues. MR !3 has been used to obtain a list of all the issues that were to be fixed.
- 🇮🇹Italy apaderno Brescia, 🇮🇹
apaderno → changed the visibility of the branch 3358798-gitlab-ci-reports to hidden.
- Status changed to RTBC
4 months ago 6:20pm 12 July 2024 - 🇵ðŸ‡Philippines roberttabigue
Hi @everyone!
I have applied the latest fixes to the Google Module Viewer module against 1.0.x-dev on Drupal 10 and confirmed all PHPCS errors have been fixed.
I ran this command on the module:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml gmv/
Please see the attached file for reference.
I'm moving this now to ‘RTBC’.
Thank you!