- Issue created by @Shanu Chouhan
- Issue was unassigned.
- Status changed to Needs work
over 1 year ago 7:30pm 12 May 2023 - š®š¹Italy apaderno Brescia, š®š¹
The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command has been used, which arguments have been used, and which report that command shown.
The command shown in the issue summary does not use the correct value for
--standard
. - Status changed to Active
over 1 year ago 7:50pm 12 May 2023 - š®š¹Italy apaderno Brescia, š®š¹
Why is only the Drupal ruleset used? There are two rulesets for Drupal coding standards: Drupal and DrupalPractice.
- Assigned to PrabuEla
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 10:27am 26 May 2023 - Status changed to Needs work
5 months ago 11:58am 7 June 2024 Hi @everyone,
Applied patch #2 and patch #5, both applied successfully patch #2 has lesser errors than patch #5
Patch #2
eventarc git:(1.0.x) curl https://www.drupal.org/files/issues/2023-05-12/3359957-2.patch | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2049 100 2049 0 0 4869 0 --:--:-- --:--:-- --:--:-- 5034 patching file src/Controller/EventarcController.php patching file src/Event/CloudStorageEvents.php patching file src/Event/EventarcEvent.php patching file src/Form/ConfigForm.php ā eventarc git:(1.0.x) ā cd .. ā contrib git:(master) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig eventarc FILE: ...9/web/modules/contrib/eventarc/tests/Controller/EventarcControllerTest.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 26 | WARNING | Possible useless method overriding detected -------------------------------------------------------------------------------- FILE: ...-site/drupal-orgissue-v9/web/modules/contrib/eventarc/eventarc.routing.yml -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 14 | WARNING | The administration page callback should probably use | | "administer site configuration" - which implies the user can | | change something - rather than "access administration pages" | | which is about viewing but not changing configurations. -------------------------------------------------------------------------------- FILE: ...te/drupal-orgissue-v9/web/modules/contrib/eventarc/src/Form/ConfigForm.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 43 | WARNING | Unused variable $name_field. -------------------------------------------------------------------------------- FILE: ...ssue-v9/web/modules/contrib/eventarc/src/Controller/EventarcController.php -------------------------------------------------------------------------------- FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 5 LINES -------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Core\Access\AccessResult. 99 | ERROR | [x] Multi-line function declarations must have a trailing | | comma after the last parameter 99 | ERROR | [x] The closing parenthesis of a multi-line function | | declaration must be on a new line 166 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency | | injection instead 188 | WARNING | [ ] t() calls should be avoided in classes, use | | \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead 202 | ERROR | [ ] Public method name "EventarcController::getGoogleJWKs" is | | not in lowerCamel format -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...-orgissue-v9/web/modules/contrib/eventarc/src/Event/CloudStorageEvents.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES -------------------------------------------------------------------------------- 11 | WARNING | Line exceeds 80 characters; contains 92 characters 13 | WARNING | Line exceeds 80 characters; contains 89 characters 25 | WARNING | Line exceeds 80 characters; contains 91 characters 27 | WARNING | Line exceeds 80 characters; contains 88 characters -------------------------------------------------------------------------------- Time: 220ms; Memory: 10MB
Patch #5
eventarc git:(1.0.x) curl https://www.drupal.org/files/issues/2023-05-26/best_practice_issue_fixed_3073778_6_0.patch | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3741 100 3741 0 0 10690 0 --:--:-- --:--:-- --:--:-- 11133 patching file eventarc.routing.yml patching file src/Controller/EventarcController.php patching file src/Form/ConfigForm.php ā eventarc git:(1.0.x) ā cd .. ā contrib git:(master) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig eventarc FILE: ...9/web/modules/contrib/eventarc/tests/Controller/EventarcControllerTest.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 26 | WARNING | Possible useless method overriding detected -------------------------------------------------------------------------------- FILE: ...te/drupal-orgissue-v9/web/modules/contrib/eventarc/src/Form/ConfigForm.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 10 | WARNING | The class short comment should describe what the class does and | | not simply repeat the class name -------------------------------------------------------------------------------- FILE: ...ssue-v9/web/modules/contrib/eventarc/src/Controller/EventarcController.php -------------------------------------------------------------------------------- FOUND 8 ERRORS AND 2 WARNINGS AFFECTING 10 LINES -------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Core\Access\AccessResult. 26 | WARNING | [ ] The class short comment should describe what the class | | does and not simply repeat the class name 31 | ERROR | [ ] Missing member variable doc comment 83 | ERROR | [ ] Parameter $requestStack is not described in comment 96 | ERROR | [ ] Missing parameter name 105 | ERROR | [x] Multi-line function declarations must have a trailing | | comma after the last parameter 106 | ERROR | [x] Multi-line function declaration not indented correctly; | | expected 2 spaces but found 4 168 | WARNING | [ ] Line exceeds 80 characters; contains 112 characters 208 | ERROR | [ ] Doc comment is empty 211 | ERROR | [ ] Public method name "EventarcController::getGoogleJWKs" is | | not in lowerCamel format -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...-orgissue-v9/web/modules/contrib/eventarc/src/Event/CloudStorageEvents.php -------------------------------------------------------------------------------- FOUND 1 ERROR AND 4 WARNINGS AFFECTING 5 LINES -------------------------------------------------------------------------------- 5 | ERROR | Doc comment is empty 11 | WARNING | Line exceeds 80 characters; contains 92 characters 13 | WARNING | Line exceeds 80 characters; contains 89 characters 25 | WARNING | Line exceeds 80 characters; contains 91 characters 27 | WARNING | Line exceeds 80 characters; contains 88 characters -------------------------------------------------------------------------------- FILE: ...rupal-orgissue-v9/web/modules/contrib/eventarc/src/Event/EventarcEvent.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 31 | ERROR | Doc comment is empty -------------------------------------------------------------------------------- Time: 231ms; Memory: 10MB
Kindly check
Thanks,
Jake- Assigned to priyanka_chauhan31
- Issue was unassigned.
- Status changed to Needs review
5 months ago 9:22am 21 June 2024 - Status changed to Needs work
5 months ago 9:03am 2 July 2024 Hi @priyanka_chauhan31,
Applied your patch successfully, however it still threw one error.
eventarc git:(1.0.x) curl https://www.drupal.org/files/issues/2024-06-21/phpcs_issues_fix-3359957-9.patch | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 9015 100 9015 0 0 27283 0 --:--:-- --:--:-- --:--:-- 27824 patching file eventarc.routing.yml patching file src/Controller/EventarcController.php patching file src/Event/CloudStorageEvents.php patching file src/Event/EventarcEvent.php patching file src/Form/ConfigForm.php patching file tests/Controller/EventarcControllerTest.php ā eventarc git:(1.0.x) ā cd .. ā contrib git:(master) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig eventarc FILE: ...ssue-v9/web/modules/contrib/eventarc/src/Controller/EventarcController.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 110 | ERROR | [x] Multi-line function declarations must have a trailing comma | | after the last parameter -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- Time: 435ms; Memory: 10MB
Kindly check
Thanks,
Jake- Assigned to priyanka_chauhan31
- Issue was unassigned.
- Status changed to Needs review
3 months ago 8:46am 5 August 2024 - š®š³India priyanka_chauhan31 Noida
Hi @a.aaronjake, please check. It should resolve the above issue.
- Status changed to Needs work
3 months ago 4:00pm 5 August 2024 - š®š¹Italy apaderno Brescia, š®š¹
Let's create a merge request, now that patches are no longer tested.
- First commit to issue fork.
- Status changed to Needs review
3 months ago 7:44am 9 August 2024 - š®š³India bhaveshdas
Hi, I have reroll the patch to MR as per #15.
could you please review it.Thankyou !!
- Status changed to RTBC
3 months ago 11:45pm 13 August 2024 Hi @everyone,
I applied the MR !1, confirmed all errors reported were resolved.
eventarc git:(1.0.x) curl https://git.drupalcode.org/project/eventarc/-/merge_requests/1.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 11296 0 11296 0 0 29436 0 --:--:-- --:--:-- --:--:-- 30365 patching file .gitlab-ci.yml patching file eventarc.routing.yml patching file src/Controller/EventarcController.php patching file src/Event/CloudStorageEvents.php patching file src/Event/EventarcEvent.php patching file src/Form/ConfigForm.php patching file tests/Controller/EventarcControllerTest.php ā eventarc git:(1.0.x) ā cd .. ā contrib git:(master) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig eventarc ā contrib git:(master) ā
Will now move this to RTBC
Thanks,
Jake- š®š¹Italy apaderno Brescia, š®š¹
- Merge request !2Created a new merge request to get the list of all the PHP_CodeSniffer errors/warnings to fix ā (Open) created by apaderno