Needs review
Project:
Rate Limiter
Version:
8.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Jun 2017 at 11:43 UTC
Updated:
13 Jul 2017 at 10:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jayesh_makwana commentedWe create a patch for solving coding standard issues for this module. Please check and apply it.
Comment #3
aneek commentedThanks for the patch. This will be addressed in the next release as this is not a blocker.
Regards,
Aneek
Comment #4
aneek commentedComment #5
dhruveshdtripathi commentedPatch applied. But giving warning about extra whitespace.
Assigning issue to myself for changing readme text as readme template: https://www.drupal.org/docs/develop/documenting-your-project/readme-template
Comment #6
dhruveshdtripathi commentedUpdated patch and interdiff added.
Comment #7
prajaankit commentedHi dhruveshdtripathi,
Firstly thanks for you work, i applied you patch, i get some error or warnings,
[vagrant@localhost html]$ cd rate_limiter/
[vagrant@localhost rate_limiter]$ git apply -v coding_standard_issues-2885396-6.patch
Checking patch README.md...
Checking patch config/install/rate_limiter.settings.yml...
Checking patch rate_limiter.info.yml...
Checking patch rate_limiter.install...
Checking patch rate_limiter.links.menu.yml...
Checking patch rate_limiter.module...
Checking patch rate_limiter.routing.yml...
Checking patch rate_limiter.services.yml...
Checking patch src/Form/RateLimiterConfigForm.php...
Checking patch src/RateLimitManager.php...
Checking patch src/RateLimitManagerInterface.php...
Checking patch src/RateLimitMiddleware.php...
Checking patch src/Tests/RateLimiterTest.php...
Applied patch README.md cleanly.
Applied patch config/install/rate_limiter.settings.yml cleanly.
Applied patch rate_limiter.info.yml cleanly.
Applied patch rate_limiter.install cleanly.
Applied patch rate_limiter.links.menu.yml cleanly.
Applied patch rate_limiter.module cleanly.
Applied patch rate_limiter.routing.yml cleanly.
Applied patch rate_limiter.services.yml cleanly.
Applied patch src/Form/RateLimiterConfigForm.php cleanly.
Applied patch src/RateLimitManager.php cleanly.
Applied patch src/RateLimitManagerInterface.php cleanly.
Applied patch src/RateLimitMiddleware.php cleanly.
Applied patch src/Tests/RateLimiterTest.php cleanly.
[vagrant@localhost rate_limiter]$ cd ../
[vagrant@localhost html]$ drupalcs rate_limiter/
FILE: /var/www/html/rate_limiter/src/Form/RateLimiterConfigForm.php
----------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
----------------------------------------------------------------------
38 | WARNING | [ ] Possible useless method overriding detected
194 | ERROR | [x] Expected 1 blank line after function; 0 found
195 | ERROR | [x] The closing brace for the class must have an
| | empty line before it
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: /var/www/html/rate_limiter/src/RateLimitManager.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
315 | ERROR | [x] Expected 1 blank line after function; 0 found
316 | ERROR | [x] The closing brace for the class must have an empty
| | line before it
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: /var/www/html/rate_limiter/src/RateLimitManagerInterface.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
82 | ERROR | [x] Expected 1 blank line after function; 0 found
83 | ERROR | [x] The closing brace for the interface must have an
| | empty line before it
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: /var/www/html/rate_limiter/src/RateLimitMiddleware.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
61 | ERROR | [x] Expected 1 blank line after function; 0 found
62 | ERROR | [x] The closing brace for the class must have an empty
| | line before it
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: /var/www/html/rate_limiter/src/Tests/RateLimiterTest.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
63 | ERROR | [x] Expected 1 blank line after function; 0 found
64 | ERROR | [x] The closing brace for the class must have an empty
| | line before it
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 293ms; Memory: 8Mb
I update your Patch.
Comment #8
prajaankit commentedNOW only one warning left.
FILE: /var/www/html/rate_limiter/src/Form/RateLimiterConfigForm.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
38 | WARNING | Possible useless method overriding detected
----------------------------------------------------------------------
Time: 306ms; Memory: 8Mb
please review it.
Thanks :)
Comment #9
prajaankit commentedComment #10
aneek commentedHello @dhruveshdtripathi & prajaankit,
Thanks for your efforts. I'd like to ask you both:
1. Which coding standard is being used? @prajaankit I don't see
phpcs --standard=Drupalin your checks. Also I believe drupalcs is merged into Coder and is not obsolete? Please check that once.2. It's better to set PAReview.sh (https://github.com/klausi/pareviewsh / https://www.drupal.org/project/pareviewsh) in local.
I ran a report through it and below are the errors/warnings found in the current branch:
This is done in the online version https://pareview.sh/ (https://pareview.sh/node/2309). I believe, it would be great if these are fixed first then we would re-visit the README.md file and others.
P.S: Please post an interdiff.txt every time.
Cheers!!
Comment #11
aneek commentedComment #12
prajaankit commentedComment #13
prajaankit commentedHi aneek ,
Thanks for your review.
CentOS box I have configured the drupalcs like this alias drupalcs="phpcs --standard=Drupal --extensions='php,module,inc,install,test,profile,theme,js,css,info,txt'" so phpcs and drupalcs are same...
Thanks
Comment #14
prajaankit commented