- Issue created by @Tirupati_Singh
- Merge request !213412557-fix-the-errorswarnings: Fixed phpcs issues. → (Open) created by Tirupati_Singh
- last update
11 months ago 55 pass - Issue was unassigned.
- Status changed to Needs review
11 months ago 5:01pm 5 January 2024 - Status changed to Needs work
9 months ago 12:50pm 27 February 2024 - 🇮🇳India Ashutosh Ahirwal India
Hi I reviewed the MR in #2 but still there are so many error found by phpcs command
Used command with argument is:-
./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/imceFILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/css/imce.icons.css
------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------
5 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
5 | ERROR | [ ] No style definition found on line; check for missing colon
6 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
6 | ERROR | [ ] No style definition found on line; check for missing colon
7 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
7 | ERROR | [ ] No style definition found on line; check for missing colon
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/imce.Folder.js
-------------------------------------------------------------------------------------------------
FOUND 31 ERRORS AFFECTING 31 LINES
-------------------------------------------------------------------------------------------------
32 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
187 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
235 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
241 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
268 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
273 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
313 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
344 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
369 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
375 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
395 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
397 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
398 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
410 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
418 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
551 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
576 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
587 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
620 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
623 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
676 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
681 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
685 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
691 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
695 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
720 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
745 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
752 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
754 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
772 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
786 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 31 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/imce.js
--------------------------------------------------------------------------------------------------
FOUND 71 ERRORS AFFECTING 69 LINES
--------------------------------------------------------------------------------------------------
274 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
276 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
393 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
439 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
542 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
545 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
553 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
587 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
621 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
632 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
675 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
676 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
679 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
680 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
683 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
701 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
705 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
714 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
716 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
725 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
728 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
737 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
739 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
748 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
754 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
759 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
761 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
770 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
777 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
779 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
786 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
789 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
791 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
793 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
919 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
919 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
920 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
1039 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
1039 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
1040 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
1089 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
1138 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
1180 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
1185 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
1199 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
1234 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
1274 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
1289 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
1297 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
1319 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
1336 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
1337 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
1338 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
1342 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
1368 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
1373 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
1406 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
1474 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
1488 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
1497 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
1596 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
1615 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
1619 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
1772 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
1831 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
1857 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
1883 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
1954 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
1976 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
2041 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
2044 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 71 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/imce.File.js
---------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------
31 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
57 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
---------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/imce.input.js
----------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------------------------------
26 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
34 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
49 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
54 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
98 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/plugins/ckeditor/imce.ckeditor.js
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
90 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/plugins/bueditor/imce.bueditor.js
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
54 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/plugins/ckeditor5/imce.ckeditor5.js
--------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------
86 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
122 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/plugins/imce/imce.newfolder.js
---------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------
48 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
59 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
63 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
65 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/plugins/imce/imce.upload.js
------------------------------------------------------------------------------------------------------------
FOUND 19 ERRORS AFFECTING 19 LINES
------------------------------------------------------------------------------------------------------------
39 | ERROR | [ ] String concat is not required here; use a single string instead
40 | ERROR | [ ] String concat is not required here; use a single string instead
42 | ERROR | [ ] String concat is not required here; use a single string instead
45 | ERROR | [ ] String concat is not required here; use a single string instead
47 | ERROR | [ ] String concat is not required here; use a single string instead
86 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
94 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
98 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
112 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
116 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
119 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
126 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
136 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
146 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
150 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
153 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
215 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
230 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
235 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/plugins/imce/imce.UploadQueue.js
-----------------------------------------------------------------------------------------------------------------
FOUND 17 ERRORS AFFECTING 17 LINES
-----------------------------------------------------------------------------------------------------------------
61 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
62 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
73 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
74 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
141 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
197 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
198 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
206 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
262 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
276 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
291 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
308 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
316 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
333 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
352 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
354 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
361 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
-----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/plugins/imce/imce.resize.js
------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------
37 | ERROR | [ ] String concat is not required here; use a single string instead
40 | ERROR | [ ] String concat is not required here; use a single string instead
43 | ERROR | [ ] String concat is not required here; use a single string instead
74 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
102 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/imce.Item.js
-------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 11 LINES
-------------------------------------------------------------------------------------------------
370 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
392 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
411 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
428 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
428 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
443 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
458 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
470 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
486 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
489 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
505 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
516 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/imce.Tbb.js
-------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 9 LINES
-------------------------------------------------------------------------------------------------
90 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
94 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
114 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
150 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
155 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
160 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
175 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
179 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
208 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/imce.filefield.js
--------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------
76 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
84 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/tests/src/Kernel/CKE4to5UpgradePathTest.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
3 | ERROR | [x] Expected strict_types=1, found strict_types = 1.
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------Time: 1.82 secs; Memory: 32MB
- Status changed to Needs review
9 months ago 6:23am 28 February 2024 - last update
9 months ago 55 pass - 🇮🇳India chaitanyadessai Goa
Fixed errors reported by vendor/bin/phpcs --standard=DrupalPractice,Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig,js web/modules/imce, few left.
- last update
7 months ago 55 pass - 🇮🇳India Tirupati_Singh
Phpcs is showing the following error on js file along with the other errors, I've fixed all of them except this one as I think this format looks good to me. Phpcs still showing errors even if we use string interpolation in below js file.
FILE: /app/web/modules/custom/imce/js/plugins/imce/imce.upload.js ---------------------------------------------------------------------- FOUND 5 ERRORS AFFECTING 5 LINES ---------------------------------------------------------------------- 39 | ERROR | String concat is not required here; use a single string | | instead 40 | ERROR | String concat is not required here; use a single string | | instead 42 | ERROR | String concat is not required here; use a single string | | instead 45 | ERROR | String concat is not required here; use a single string | | instead 47 | ERROR | String concat is not required here; use a single string | | instead ---------------------------------------------------------------------- FILE: /app/web/modules/custom/imce/js/plugins/imce/imce.resize.js ---------------------------------------------------------------------- FOUND 3 ERRORS AFFECTING 3 LINES ---------------------------------------------------------------------- 37 | ERROR | String concat is not required here; use a single string | | instead 40 | ERROR | String concat is not required here; use a single string | | instead 43 | ERROR | String concat is not required here; use a single string | | instead ----------------------------------------------------------------------
- Status changed to Needs work
6 months ago 8:59am 3 June 2024 Hi,
@Tirupati_Singh, I've applied your patch on the specified version of the module, apart from the js issues I'm also getting two more issues which are being reported by Phpcs.FILE: /app/web/modules/contrib/imce/PATCHES.txt ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 5 | ERROR | [x] Expected 1 newline at end of file; 3 found ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ...modules/contrib/imce/tests/src/Kernel/CKE4to5UpgradePathTest.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 3 | ERROR | [x] Expected strict_types=1, found strict_types = 1. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- Time: 987ms; Memory: 34MB
And as far as the errors regarding the js files are concerned, I took a deeper dive into the issue, and discovered that the coding standards that we're passing over here or in general are Drupal and DrupalPractice which doesn't scan the js files by default as the Drupal coding standard is limited to the scanning of these files :
php,module,inc,install,test,profile,theme,css,info,txt,md,yml
and DrupalPractice scans these following extensions:php,module,inc,install,test,profile,theme,yml
Both of them are not considering js files by dafault, so we need to include js file explicitly.
Ref issue: https://github.com/acquia/blt/issues/2861And on another issue of D.C it has been stated that eslint should be the preferred tool for finding and fixing js issues, and I also do belief the same, as it provides a more robust way to define rulesets and getting access to a wide repository of pre-defined rulesets like that of airbnb, airbnb-base etc, along with that we can define our custom rulesets or develop custom plugins which can be more fruitful in streamlining dev process.
Ref link: https://www.drupal.org/project/drupal/issues/2975201 →But I got confused on seeing this: https://github.com/acquia/blt/issues/2861
Where it has been stated that Phpcs can now sniff and lintJs by conforming to the rulesets defined in Core's .eslintrc file. But the issue over that is, it seems that Phpcs is not correctly referring to the Core's eslint rulesets.
Ref link: https://github.com/acquia/blt/issues/2845After all these RnD, I believe that it'll be better to ignore these Js issues as of now, and only target the remaining issues and then it'll be more robust to prepare a module specific .eslintrc file and then running the js linting task over that specified rule. Though for that we need to discuss with the module maintainer and raise a new ticket for the same, as it goes beyond the scope of Phpcs fixes!
Hence adding the label of 'Needs subsystem maintainer review' and moving it to NW state for fixing the remaining two issues!- Assigned to Tirupati_Singh
- last update
6 months ago 55 pass - Issue was unassigned.
- Status changed to Needs review
6 months ago 12:27pm 7 June 2024 - 🇮🇳India Tirupati_Singh
@sourojeetpaul, I've fixed the mentioned phpcs issues. Please review.
On applying the patch below warning is still showing and the new line on PATCHES.txt file is being added by the Cweagan composer patch.FILE: /app/web/modules/contrib/imce/PATCHES.txt ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 5 | ERROR | [x] Expected 1 newline at end of file; 3 found ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------
- Status changed to RTBC
6 months ago 12:40pm 7 June 2024 Hello Tirupati_Singh,
Yes you're right, the error on the PATCHES.txt is coming from cweagan composer dependency and it'll be dynamically generated everytime on applying patch via composer, so its not an issue of this module.
The other one which was there, is now resolved after the new commit.
Hence moving it to RTBC++- Status changed to Fixed
6 months ago 11:16pm 8 June 2024 - Status changed to Active
6 months ago 8:32am 10 June 2024 Hello @ufku,
Went through your commits just a while ago and noticed its doing some optimisation and coding standard fixes as well, but I'm afraid that it doesn't addresses the Phpcs reported issues.
The issue is talking about the errors that are being reported by Phpcs and not other code optimisations, hence I think it would've been better if we had been limited to the issue title only, as it'll be more transparent in future to track changes.Not sure why this issue got closed, when you haven't merged the MR which was addressing the same. As a result all the Phpcs issues still persist on the latest tag.
Merger of the MR could've rightfully solved it.It also came to my notice that the recent commits are failing some tests as well along with some warnings, apart from that as the changes have been made directly onto the target branch, resulting in a merge error for the existing MR.
Would love to hear from you soon. Till then I'm reopening the issue as its still reporting the Phpcs issues:
FILE: /app/web/modules/contrib/imce/js/imce.js ---------------------------------------------------------------------- FOUND 71 ERRORS AFFECTING 69 LINES ---------------------------------------------------------------------- 274 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 276 | ERROR | [x] Functions must not contain multiple empty lines | | in a row; found 2 empty lines 393 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found 439 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 542 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 545 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 553 | ERROR | [x] Functions must not contain multiple empty lines | | in a row; found 2 empty lines 587 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 621 | ERROR | [x] Functions must not contain multiple empty lines | | in a row; found 2 empty lines 632 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 675 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 676 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 679 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 680 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 683 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 701 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 705 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 714 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 716 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 725 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 728 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 737 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 739 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 748 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 754 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 759 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 761 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 770 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 777 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 779 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 786 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 789 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 791 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 793 | ERROR | [x] Functions must not contain multiple empty lines | | in a row; found 2 empty lines 919 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 919 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 920 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 1039 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 1039 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 1040 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 1089 | ERROR | [x] Functions must not contain multiple empty lines | | in a row; found 2 empty lines 1138 | ERROR | [x] Functions must not contain multiple empty lines | | in a row; found 2 empty lines 1180 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 1185 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 1199 | ERROR | [x] Functions must not contain multiple empty lines | | in a row; found 2 empty lines 1234 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 1274 | ERROR | [x] Functions must not contain multiple empty lines | | in a row; found 2 empty lines 1289 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 1297 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 1319 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 1336 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 1337 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 1338 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 1342 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 1368 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 1373 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 1406 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 1474 | ERROR | [x] Functions must not contain multiple empty lines | | in a row; found 2 empty lines 1488 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 1497 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 1596 | ERROR | [x] Functions must not contain multiple empty lines | | in a row; found 2 empty lines 1615 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 1619 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 1772 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 1831 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 1857 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 1883 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 1954 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 1976 | ERROR | [x] Functions must not contain multiple empty lines | | in a row; found 2 empty lines 2041 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 2044 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" ---------------------------------------------------------------------- PHPCBF CAN FIX THE 71 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: /app/web/modules/contrib/imce/js/imce.input.js ---------------------------------------------------------------------- FOUND 5 ERRORS AFFECTING 5 LINES ---------------------------------------------------------------------- 26 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found 34 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found 49 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found 54 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 98 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found ---------------------------------------------------------------------- PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: /app/web/modules/contrib/imce/js/imce.Tbb.js ---------------------------------------------------------------------- FOUND 9 ERRORS AFFECTING 9 LINES ---------------------------------------------------------------------- 90 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 94 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 114 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 150 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 155 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 160 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 175 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 179 | ERROR | [x] Functions must not contain multiple empty lines in | | a row; found 2 empty lines 208 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" ---------------------------------------------------------------------- PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: /app/web/modules/contrib/imce/js/imce.filefield.js ---------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES ---------------------------------------------------------------------- 76 | ERROR | [x] Functions must not contain multiple empty lines in | | a row; found 2 empty lines 84 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" ---------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: /app/web/modules/contrib/imce/js/imce.Folder.js ---------------------------------------------------------------------- FOUND 31 ERRORS AFFECTING 31 LINES ---------------------------------------------------------------------- 32 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 187 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 235 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 241 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 268 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 273 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 313 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 344 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 369 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 375 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 395 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 397 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 398 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 410 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 418 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 551 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 576 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 587 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 620 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 623 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 676 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 681 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 685 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 691 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 695 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 720 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 745 | ERROR | [x] Functions must not contain multiple empty lines in | | a row; found 2 empty lines 752 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 754 | ERROR | [x] Functions must not contain multiple empty lines in | | a row; found 2 empty lines 772 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 786 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" ---------------------------------------------------------------------- PHPCBF CAN FIX THE 31 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: /app/web/modules/contrib/imce/js/imce.File.js ---------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES ---------------------------------------------------------------------- 31 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 57 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" ---------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: .../web/modules/contrib/imce/js/plugins/ckeditor5/imce.ckeditor5.js ---------------------------------------------------------------------- FOUND 17 ERRORS AFFECTING 6 LINES ---------------------------------------------------------------------- 31 | ERROR | [x] Expected 1 space before "?"; 0 found 31 | ERROR | [x] Expected 1 space after "?"; 0 found 31 | ERROR | [x] Expected 1 space before "?"; 0 found 31 | ERROR | [x] Expected 1 space after "?"; 0 found 31 | ERROR | [x] Expected 1 space before "?"; 0 found 31 | ERROR | [x] Expected 1 space after "?"; 0 found 33 | ERROR | [x] Expected 1 space before "?"; 0 found 33 | ERROR | [x] Expected 1 space after "?"; 0 found 33 | ERROR | [x] Expected 1 space before "?"; 0 found 33 | ERROR | [x] Expected 1 space after "?"; 0 found 35 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 38 | ERROR | [x] Expected 1 space before "?"; 0 found 38 | ERROR | [x] Expected 1 space after "?"; 0 found 38 | ERROR | [x] Expected 1 space before "?"; 0 found 38 | ERROR | [x] Expected 1 space after "?"; 0 found 91 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 127 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" ---------------------------------------------------------------------- PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: /app/web/modules/contrib/imce/js/plugins/imce/imce.upload.js ---------------------------------------------------------------------- FOUND 19 ERRORS AFFECTING 19 LINES ---------------------------------------------------------------------- 39 | ERROR | [ ] String concat is not required here; use a single | | string instead 40 | ERROR | [ ] String concat is not required here; use a single | | string instead 42 | ERROR | [ ] String concat is not required here; use a single | | string instead 45 | ERROR | [ ] String concat is not required here; use a single | | string instead 47 | ERROR | [ ] String concat is not required here; use a single | | string instead 86 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 94 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 98 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 112 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 116 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 119 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 126 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 136 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 146 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 150 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 153 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 215 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 230 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 235 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" ---------------------------------------------------------------------- PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: /app/web/modules/contrib/imce/js/plugins/imce/imce.resize.js ---------------------------------------------------------------------- FOUND 5 ERRORS AFFECTING 5 LINES ---------------------------------------------------------------------- 37 | ERROR | [ ] String concat is not required here; use a single | | string instead 40 | ERROR | [ ] String concat is not required here; use a single | | string instead 43 | ERROR | [ ] String concat is not required here; use a single | | string instead 74 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 102 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" ---------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: /app/web/modules/contrib/imce/js/plugins/imce/imce.newfolder.js ---------------------------------------------------------------------- FOUND 4 ERRORS AFFECTING 4 LINES ---------------------------------------------------------------------- 48 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 59 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 63 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 65 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" ---------------------------------------------------------------------- PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ...app/web/modules/contrib/imce/js/plugins/imce/imce.UploadQueue.js ---------------------------------------------------------------------- FOUND 17 ERRORS AFFECTING 17 LINES ---------------------------------------------------------------------- 61 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 62 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 73 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 74 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 141 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 197 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 198 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 206 | ERROR | [x] Functions must not contain multiple empty lines in | | a row; found 2 empty lines 262 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 276 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 291 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 308 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 316 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 333 | ERROR | [x] Functions must not contain multiple empty lines in | | a row; found 2 empty lines 352 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 354 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 361 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" ---------------------------------------------------------------------- PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ...pp/web/modules/contrib/imce/js/plugins/bueditor/imce.bueditor.js ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 54 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: /app/web/modules/contrib/imce/js/imce.Item.js ---------------------------------------------------------------------- FOUND 12 ERRORS AFFECTING 11 LINES ---------------------------------------------------------------------- 370 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 392 | ERROR | [x] Functions must not contain multiple empty lines in | | a row; found 2 empty lines 411 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 428 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 428 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 443 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 458 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 470 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "NULL" but found "null" 486 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found 489 | ERROR | [x] Functions must not contain multiple empty lines in | | a row; found 2 empty lines 505 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" 516 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "FALSE" but found "false" ---------------------------------------------------------------------- PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: /app/web/modules/contrib/imce/css/imce.icons.css ---------------------------------------------------------------------- FOUND 6 ERRORS AFFECTING 3 LINES ---------------------------------------------------------------------- 5 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found | | 4 5 | ERROR | [ ] No style definition found on line; check for missing | | colon 6 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found | | 4 6 | ERROR | [ ] No style definition found on line; check for missing | | colon 7 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found | | 4 7 | ERROR | [ ] No style definition found on line; check for missing | | colon ---------------------------------------------------------------------- PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- Time: 679ms; Memory: 34MB
- Status changed to Needs work
6 months ago 8:43am 10 June 2024 Also, after applying the patch over the latest release, though it solves most of them as already RTBCed, but now we're getting some errors as well, so we need to incorporate those fixes as well over here and solve the merge error!
FILE: .../web/modules/contrib/imce/js/plugins/ckeditor5/imce.ckeditor5.js ---------------------------------------------------------------------- FOUND 15 ERRORS AFFECTING 4 LINES ---------------------------------------------------------------------- 31 | ERROR | [x] Expected 1 space before "?"; 0 found 31 | ERROR | [x] Expected 1 space after "?"; 0 found 31 | ERROR | [x] Expected 1 space before "?"; 0 found 31 | ERROR | [x] Expected 1 space after "?"; 0 found 31 | ERROR | [x] Expected 1 space before "?"; 0 found 31 | ERROR | [x] Expected 1 space after "?"; 0 found 33 | ERROR | [x] Expected 1 space before "?"; 0 found 33 | ERROR | [x] Expected 1 space after "?"; 0 found 33 | ERROR | [x] Expected 1 space before "?"; 0 found 33 | ERROR | [x] Expected 1 space after "?"; 0 found 35 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected | | "TRUE" but found "true" 38 | ERROR | [x] Expected 1 space before "?"; 0 found 38 | ERROR | [x] Expected 1 space after "?"; 0 found 38 | ERROR | [x] Expected 1 space before "?"; 0 found 38 | ERROR | [x] Expected 1 space after "?"; 0 found ----------------------------------------------------------------------
Hence moving it to NW state!
- Status changed to Fixed
6 months ago 11:11am 10 June 2024 @sourojeetpaul This was for php files. The phpcs pipeline succeeds.
https://git.drupalcode.org/project/imce/-/jobs/1819695Hi @ufku,
Now I got what was causing the mismatch between your findings and mine. Basically there was version mismatch of php_codesniffer and coder and we were running the standards through. Now updated my version and can confirm no errors are there.
But one thing caught my attention while going through the artifacts for Phpcs check: https://project.pages.drupalcode.org/-/imce/-/jobs/1819695/artifacts/jun...
Here I can see we're scanning only the php files in terms of the extension of .php, .module, .install on contrary to that the job is running over Drupal and DrupalPractice coding standards which incorporates other types of file as well like the css file, .md, .yml file etc. So wondering what's the reason for this anomaly?
Also I can see we're not checking for js files at all, as it doesn't get checked by default by Phpcs. I'm aware that the eslint will be a more robust tool for finding and fixing js errors but as per my findings mentioned on thread #7 🐛 Fix the errors/warnings reported by PHP_CodeSniffer. Fixed Phpcs now uses core's eslint config when we're explicitly forcing Phpcs to check for Js errors. Now as we don't have any custom eslint configured specifically for the module, we can use core's eslint config to address some common issues, and later on if the module incorporates its own eslint config we can move to that certainly.
As per as the CSS errors are concerned, Phpcs and Phpcbf comes pretty handy to address those, here we're not even using SCSS or POSTCSS so it shouldn't cause any issue as well!Can you kindly enlighten me on these?
Hi @ufku,
Haven't heard from you for a while regarding comment #18 🐛 Fix the errors/warnings reported by PHP_CodeSniffer. Fixed .
Also I can see the issue status has been moved to fixed but none of the contributors have been allotted credit. So can you kindly have a look at it again, and grant credit to the contributors and reviewers their due credit as they've put forward their time and effort in addressing the issue!
Thanks in advance!Automatically closed - issue fixed for 2 weeks with no activity.