- Issue created by @sidharth_soman
- š®š³India sidharth_soman Bangalore
After running the phpcs command on the module, I found the above coding standard errors/warnings as detailed in the issue summary. I'll work on fixing them.
- Issue was unassigned.
- š®š¹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.
- Status changed to Needs review
over 1 year ago 11:59am 19 June 2023 - Status changed to Needs work
over 1 year ago 10:41pm 19 June 2023 - šµšPhilippines paraderojether
Hi
I reviewed MR!12 and still getting phpcs issues shown below after running this command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml.
FILE: ...l.org/drupalorg-site/docroot/modules/contrib/varnish_purge/modules/varnish_purge_tags/src/Tests/CacheTagsTest.php ----------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------- 14 | ERROR | Missing member variable doc comment ----------------------------------------------------------------------------------------------------------------------- FILE: ...l.org/drupalorg-site/docroot/modules/contrib/varnish_purge/modules/varnish_image_purge/varnish_image_purge.module ----------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------- 125 | WARNING | Unused variable $delta. ----------------------------------------------------------------------------------------------------------------------- FILE: ...Users/studenttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/varnish_purge/src/DebugCallGraphTrait.php ----------------------------------------------------------------------------------------------------------------------- FOUND 4 ERRORS AFFECTING 4 LINES ----------------------------------------------------------------------------------------------------------------------- 11 | ERROR | Doc comment is empty 30 | ERROR | Description for the @return value is missing 84 | ERROR | Description for the @return value is missing 106 | ERROR | Description for the @return value is missing ----------------------------------------------------------------------------------------------------------------------- FILE: ...rs/studenttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/varnish_purge/src/Form/VarnishPurgerForm.php ----------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------- 10 | ERROR | Missing short description in doc comment ----------------------------------------------------------------------------------------------------------------------- FILE: ...enttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/varnish_purge/src/Form/VarnishBundledPurgerForm.php ----------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------- 10 | ERROR | Missing short description in doc comment ----------------------------------------------------------------------------------------------------------------------- FILE: ...tudenttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/varnish_purge/src/Form/VarnishPurgerFormBase.php ----------------------------------------------------------------------------------------------------------------------- FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 5 LINES ----------------------------------------------------------------------------------------------------------------------- 24 | ERROR | Missing short description in doc comment 81 | ERROR | Public method name "VarnishPurgerFormBase::getFormID" is not in lowerCamel format 256 | ERROR | Description for the @return value is missing 362 | WARNING | '@todo' should match the format '@todo Fix problem X here.' 376 | WARNING | Unused variable $tokens. ----------------------------------------------------------------------------------------------------------------------- FILE: ...denttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/varnish_purge/src/Entity/VarnishPurgerSettings.php ----------------------------------------------------------------------------------------------------------------------- FOUND 12 ERRORS AFFECTING 12 LINES ----------------------------------------------------------------------------------------------------------------------- 87 | ERROR | Class property $request_method should use lowerCamel naming without underscores 96 | ERROR | Missing short description in doc comment 108 | ERROR | Missing short description in doc comment 117 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph 121 | ERROR | Class property $runtime_measurement should use lowerCamel naming without underscores 135 | ERROR | Class property $connect_timeout should use lowerCamel naming without underscores 139 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph 143 | ERROR | Class property $cooldown_time should use lowerCamel naming without underscores 148 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph 152 | ERROR | Class property $max_requests should use lowerCamel naming without underscores 157 | ERROR | Missing short description in doc comment 164 | ERROR | Class property $http_errors should use lowerCamel naming without underscores ----------------------------------------------------------------------------------------------------------------------- FILE: ...ainees/Drupal.org/drupalorg-site/docroot/modules/contrib/varnish_purge/src/Tests/VarnishBundledPurgerFormTest.php ----------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------- 26 | ERROR | Missing short description in doc comment ----------------------------------------------------------------------------------------------------------------------- FILE: ...udenttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/varnish_purge/src/Tests/VarnishPurgerFormTest.php ----------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------- 26 | ERROR | Missing short description in doc comment ----------------------------------------------------------------------------------------------------------------------- FILE: ...ttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/varnish_purge/src/Tests/VarnishPurgerFormTestBase.php ----------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------- 49 | WARNING | Line exceeds 80 characters; contains 84 characters ----------------------------------------------------------------------------------------------------------------------- FILE: ....org/drupalorg-site/docroot/modules/contrib/varnish_purge/src/Plugin/Purge/DiagnosticCheck/ConfigurationCheck.php ----------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES ----------------------------------------------------------------------------------------------------------------------- 24 | ERROR | Missing short description in doc comment 30 | WARNING | Line exceeds 80 characters; contains 89 characters ----------------------------------------------------------------------------------------------------------------------- FILE: ...ees/Drupal.org/drupalorg-site/docroot/modules/contrib/varnish_purge/src/Plugin/Purge/Purger/VarnishPurgerBase.php ----------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------- 17 | ERROR | Missing short description in doc comment ----------------------------------------------------------------------------------------------------------------------- FILE: ...nees/Drupal.org/drupalorg-site/docroot/modules/contrib/varnish_purge/src/Plugin/Purge/Purger/ZeroConfigPurger.php ----------------------------------------------------------------------------------------------------------------------- FOUND 8 ERRORS AND 1 WARNING AFFECTING 9 LINES ----------------------------------------------------------------------------------------------------------------------- 46 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph 57 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph 137 | ERROR | Description for the @return value is missing 211 | WARNING | Line exceeds 80 characters; contains 81 characters 357 | ERROR | Missing parameter comment 410 | ERROR | Missing parameter comment 515 | ERROR | Description for the @return value is missing 524 | ERROR | Missing parameter comment 526 | ERROR | Description for the @return value is missing ----------------------------------------------------------------------------------------------------------------------- Time: 767ms; Memory: 14MB
Please check.
Thank You. - Assigned to nitin_lama
- Issue was unassigned.
- š®š³India nitin_lama India
Fixed most of the warnings/errors. Only remaining phpcs errors/warnings are these:
FILE: /home/system/Documents/contribution/varnish_purge-3354158/modules/varnish_purge_tags/src/Tests/CacheTagsTest.php ---------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------------------------------------------------------- 14 | ERROR | Missing member variable doc comment ---------------------------------------------------------------------------------------------------------------------- FILE: /home/system/Documents/contribution/varnish_purge-3354158/src/Entity/VarnishPurgerSettings.php ------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------- 150 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph ------------------------------------------------------------------------------------------------------------------- FILE: /home/system/Documents/contribution/varnish_purge-3354158/src/Plugin/Purge/Purger/ZeroConfigPurger.php ------------------------------------------------------------------------------------------------------------------ FOUND 2 ERRORS AFFECTING 2 LINES ------------------------------------------------------------------------------------------------------------------ 46 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph 57 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph ------------------------------------------------------------------------------------------------------------------ FILE: /home/system/Documents/contribution/varnish_purge-3354158/src/Plugin/Purge/DiagnosticCheck/ConfigurationCheck.php ----------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------- 32 | WARNING | Line exceeds 80 characters; contains 89 characters ----------------------------------------------------------------------------------------------------------------------- FILE: /home/system/Documents/contribution/varnish_purge-3354158/src/Tests/VarnishPurgerFormTestBase.php ------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------- 49 | WARNING | Line exceeds 80 characters; contains 84 characters ------------------------------------------------------------------------------------------------------- Time: 188ms; Memory: 10MB
- Status changed to Needs review
over 1 year ago 8:11am 22 June 2023 - š®š³India Bhupesh_upadhyay
All the issues are fixed including the remaining ones, Kindly review.
- Status changed to RTBC
over 1 year ago 1:40am 23 June 2023 - šµšPhilippines paraderojether
I reviewed patch #10, applied against Varnish purger 8.x-2.x-dev, and confirme it fixes the issues reported by phpcs.
I added screenshots for reference.
Thank You. - Status changed to Needs work
over 1 year ago 4:49pm 23 June 2023 - š®š¹Italy apaderno Brescia, š®š¹
- // TODO: Consider are we not doing duplicated work related to varnish_image purge... + // @todo Consider are we not doing duplicated work related to varnish_image purge...
It is probably either one or the other of these sentences
Consider we are not duplicating work related to varnish_image purge.
Consider to avoid duplicating the word done in varnish_image purge.
- // @todo - // Validations. + // @todo Validations.
@todo Add validation. is better.
- Assigned to nitin_lama
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 11:17am 26 June 2023 Hi, patch #10 fixes all the issues reported by phpcs and patch #12 addresses the issue mentioned in #12.
Thankyou.- Status changed to Needs work
12 months ago 10:13am 5 February 2024 - š®š¹Italy apaderno Brescia, š®š¹
Since there is already a MR, let's continue with that.
- Assigned to nitin_lama
- Status changed to Needs review
12 months ago 12:43pm 5 February 2024 - First commit to issue fork.
- š®š³India Yashaswi18
Remaining issues:
FILE: /home/yashaswi/contribs/varnish_purge/src/Tests/VarnishPurgerFormTestBase.php ----------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ----------------------------------------------------------------------------------- 49 | WARNING | Line exceeds 80 characters; contains 84 characters ----------------------------------------------------------------------------------- FILE: /home/yashaswi/contribs/varnish_purge/src/Plugin/Purge/DiagnosticCheck/ConfigurationCheck.php --------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE --------------------------------------------------------------------------------------------------- 32 | WARNING | Line exceeds 80 characters; contains 89 characters ---------------------------------------------------------------------------------------------------
Please review.
- Status changed to Needs work
8 months ago 12:09pm 24 May 2024 - šµšPhilippines cleavinjosh
Hi @Yashaswi18,
I applied MR!12, it applied smoothly and after I ran
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml
, these are the issues on my end.ā varnish_purge git:(8.x-2.2) curl https://git.drupalcode.org/project/varnish_purge/-/merge_requests/12.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 38758 0 38758 0 0 55785 0 --:--:-- --:--:-- --:--:-- 55766 patching file modules/varnish_focal_point_purge/varnish_focal_point_purge.module patching file modules/varnish_image_purge/src/Form/VarnishImagePurgeConfiguration.php patching file modules/varnish_image_purge/varnish_image_purge.module patching file modules/varnish_purge_tags/src/Plugin/Purge/TagsHeader/CacheTags.php patching file modules/varnish_purge_tags/src/Tests/CacheTagsTest.php patching file src/DebugCallGraphTrait.php patching file src/Entity/VarnishPurgerSettings.php patching file src/Form/VarnishBundledPurgerForm.php patching file src/Form/VarnishPurgerForm.php patching file src/Form/VarnishPurgerFormBase.php patching file src/Plugin/Purge/DiagnosticCheck/ConfigurationCheck.php patching file src/Plugin/Purge/Purger/VarnishBundledPurger.php patching file src/Plugin/Purge/Purger/VarnishPurger.php patching file src/Plugin/Purge/Purger/VarnishPurgerBase.php patching file src/Plugin/Purge/Purger/ZeroConfigPurger.php patching file src/Tests/VarnishBundledPurgerFormTest.php patching file src/Tests/VarnishPurgerFormTest.php patching file tests/src/Behat/features/bootstrap/VarnishPurgeFeatureContext.php ā varnish_purge git:(8.x-2.2) ā .. ā contrib git:(main) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml varnish_purge FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/varnish_purge/modules/varnish_image_purge/src/Form/VarnishImagePurgeConfiguration.php -------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------------------------------------------------------- 45 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter -------------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/varnish_purge/src/Tests/VarnishPurgerFormTestBase.php ------------------------------------------------------------------------------------------------------------------------ FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------ 49 | WARNING | Line exceeds 80 characters; contains 84 characters ------------------------------------------------------------------------------------------------------------------------ FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/varnish_purge/src/Plugin/Purge/DiagnosticCheck/ConfigurationCheck.php ---------------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------------------------------------------------------------------------- 32 | WARNING | Line exceeds 80 characters; contains 89 characters ---------------------------------------------------------------------------------------------------------------------------------------- Time: 648ms; Memory: 12MB ā contrib git:(main) ā
Thank you.
- First commit to issue fork.
- Status changed to Needs review
7 months ago 10:04am 27 June 2024 - š®š³India kalash-j jaipur
I have fixed all the remaining issues of PHPCS.
- Issue was unassigned.
- Status changed to Needs work
7 months ago 7:04am 4 July 2024 - š®š³India atul_ghate
I have reviewed and applied your changes by converting the merge request into a patch. This resolved all issues except one, which can be fixed by running phpcbf. I am changing the status to "needs work".
- Status changed to Needs review
7 months ago 6:48am 5 July 2024 - š®š³India kalash-j jaipur
@atul_ghate I have fixed that error
there is no phpcs error now - Status changed to RTBC
7 months ago 6:57am 5 July 2024 - š®š³India atul_ghate
I have reviewed and applied latest MR 12. it resolved all the phpcs issues, moving to RTBC