Problem/Motivation
Getting following error/warnings.
FILE: /var/www/html/modules/contrib/views_remote_data/tests/modules/views_remote_data_pokeapi/config/install/core.entity_view_display.node.pokemon.teaser.yml
-------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------------------
35 | ERROR | [x] Expected 1 newline at end of file; 2 found
-------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/views_remote_data/tests/modules/views_remote_data_pokeapi/config/install/core.entity_view_display.node.pokemon.default.yml
--------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------------------------------
34 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/views_remote_data/tests/modules/views_remote_data_pokeapi/README.md
-------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
-------------------------------------------------------------------------------------------------------
5 | WARNING | Line exceeds 80 characters; contains 119 characters
6 | WARNING | Line exceeds 80 characters; contains 119 characters
11 | WARNING | Line exceeds 80 characters; contains 111 characters
16 | WARNING | Line exceeds 80 characters; contains 89 characters
-------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/views_remote_data/tests/src/Kernel/Plugin/views/sort/PropertySortTest.php
-------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
24 | ERROR | [x] Expected 1 blank line before function; 0 found
-------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/views_remote_data/tests/src/Kernel/Plugin/views/argument/PropertyArgumentTest.php
---------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------
24 | ERROR | [x] Expected 1 blank line before function; 0 found
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/views_remote_data/tests/src/Kernel/Plugin/views/ViewsPluginTestBase.php
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
27 | ERROR | [x] Expected 1 blank line before function; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/views_remote_data/tests/src/Kernel/Plugin/views/field/PropertyFieldTest.php
---------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------
24 | ERROR | [x] Expected 1 blank line before function; 0 found
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/views_remote_data/tests/src/Kernel/Plugin/views/filter/PropertyFilterTest.php
-----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
24 | ERROR | [x] Expected 1 blank line before function; 0 found
-----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/views_remote_data/tests/src/Kernel/Plugin/views/query/RemoteDataQueryTest.php
-----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
25 | ERROR | [x] Expected 1 blank line before function; 0 found
-----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/views_remote_data/tests/src/Kernel/Events/RemoteDataQueryEventTest.php
----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------
25 | ERROR | [x] Expected 1 blank line before function; 0 found
----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/views_remote_data/tests/src/Kernel/Events/RemoteDataLoadEntitiesEventTest.php
-----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
26 | ERROR | [x] Expected 1 blank line before function; 0 found
-----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/views_remote_data/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
5 | WARNING | Line exceeds 80 characters; contains 119 characters
----------------------------------------------------------------------
Time: 10.38 secs; Memory: 6MB
Steps to reproduce
Run following command
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/views_remote_data/
Proposed resolution
Above error/warnings need to be fixed.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | after patch.png | 128.31 KB | paraderojether |
| #10 | before patch.png | 193.43 KB | paraderojether |
| #4 | Screenshot 2023-02-16 at 10.47.41 AM.png | 133.44 KB | spriya2896 |
| #2 | 3342224-2.patch | 7.18 KB | samitk |
Issue fork views_remote_data-3342224
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
samitk commentedAbove error/warnings are fixed.
Comment #3
spriya2896 commentedI will test this patch.
Comment #4
spriya2896 commentedI have tested this patch. This patch was applied successfully and shows no phpcs errors.
Comment #5
spriya2896 commentedComment #6
avpadernoComment #8
avpadernoComment #9
avpadernoIt would be better that the patch is reviewed by somebody who does not work on the same organization.
Comment #10
paraderojether commentedI reviewed patch #2, and verified it fixes the issues reported by the phpcs. Drupal core version 9.5.8, and Views Remote Data 1.0.X-dev.
I added screenshots for reference.
Thank You.
Comment #13
ankitv18 commentedComment #14
ankitv18 commented@mglaman please review the MR!20
Comment #15
clarkssquared commentedHi
I applied the updated MR !20 after commit #14 and I can still see many PHPCS issues:
Comment #16
ankitv18 commentedRebased and made minor changes to make pipelines green for all.
Comment #17
mglamanComment #18
mglamanComment #20
mglaman