- Issue created by @urvashi_vora
- 🇮🇳India Ashutosh Ahirwal India
Provided patch get applied but still showing errors
Used command
./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/partial_page_printRemaining issue
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/partial_page_print/js/printButton.js
-------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Expected 1 space before "-"; 0 found
9 | ERROR | [x] Expected 1 space after "-"; 0 found
34 | ERROR | [x] Expected 1 space before "="; 0 found
-------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/partial_page_print/js/printDocument.js
---------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------
12 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------Time: 139ms; Memory: 10MB
Providing updated patch with all the fixes.
- 🇮🇳India rudrakumar188
Hello,
I was able to reproduce the errors with given command./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/partial_page_print
and the given patch #2 fixes all the errors.
- 🇺🇸United States chrissnyder Maryland
PHPCS and PHPCBF should not be run against Javascript because they can break their functionality as they are not PHP. In general, the PHPCS tools should only run against PHP files. Patch #2 breaks the the JS provided by this module.
- @chrissnyder opened merge request.
-
ChrisSnyder →
committed d53c602a on 1.0.x
Issue #3373753 by ChrisSnyder, urvashi_vora, Ashutosh Ahirwal: Fix the...
-
ChrisSnyder →
committed d53c602a on 1.0.x
- Status changed to Fixed
about 1 year ago 3:37pm 9 November 2023 Automatically closed - issue fixed for 2 weeks with no activity.