- Issue created by @sourojeetpaul
- Status changed to Needs review
10 months ago 11:26am 8 April 2024 Fixed all the coding standard issues reported by Phpcs. Here is the corresponding MR link. Please have a look:
https://git.drupalcode.org/project/school_theme/-/merge_requests/31- Status changed to Needs work
10 months ago 2:52pm 13 April 2024 - ๐ต๐ญPhilippines clarkssquared
Hi
I applied your MR !31 and I can still see many PHPCS errors in my end
โ school_theme git:(master) โ curl https://git.drupalcode.org/project/school_theme/-/merge_requests/31.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 12742 0 12742 0 0 24997 0 --:--:-- --:--:-- --:--:-- 25281 patching file school.theme โ school_theme git:(master) โ .. โ contrib git:(master) โ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml school_theme FILE: ...ubing/Projects/d9/d9-local/web/themes/contrib/school_theme/school.info.yml -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE -------------------------------------------------------------------------------- 1 | WARNING | Remove "project" from the info file, it will be added by | | drupal.org packaging automatically 1 | WARNING | Remove "datestamp" from the info file, it will be added by | | drupal.org packaging automatically 1 | WARNING | Remove "version" from the info file, it will be added by | | drupal.org packaging automatically -------------------------------------------------------------------------------- FILE: ...-subing/Projects/d9/d9-local/web/themes/contrib/school_theme/css/style.css -------------------------------------------------------------------------------- FOUND 369 ERRORS AFFECTING 230 LINES -------------------------------------------------------------------------------- 1 | ERROR | [x] Selectors must be on a single line 2 | ERROR | [x] Selectors must be on a single line 3 | ERROR | [x] Selectors must be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 4 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 5 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 6 | ERROR | [x] Multiple selectors should each be on a single line 7 | ERROR | [x] Multiple selectors should each be on a single line 7 | ERROR | [x] Multiple selectors should each be on a single line 7 | ERROR | [x] Multiple selectors should each be on a single line 7 | ERROR | [x] Multiple selectors should each be on a single line 7 | ERROR | [x] Multiple selectors should each be on a single line 7 | ERROR | [x] Multiple selectors should each be on a single line 7 | ERROR | [x] Multiple selectors should each be on a single line 17 | ERROR | [x] Multiple selectors should each be on a single line 17 | ERROR | [x] Multiple selectors should each be on a single line 17 | ERROR | [x] Multiple selectors should each be on a single line 17 | ERROR | [x] Multiple selectors should each be on a single line 17 | ERROR | [x] Multiple selectors should each be on a single line 17 | ERROR | [x] Multiple selectors should each be on a single line 17 | ERROR | [x] Multiple selectors should each be on a single line 17 | ERROR | [x] Multiple selectors should each be on a single line 17 | ERROR | [x] Multiple selectors should each be on a single line 17 | ERROR | [x] Multiple selectors should each be on a single line 45 | ERROR | [x] Closing brace of class definition must be on new line 137 | ERROR | [x] CSS colours must be defined in lowercase; expected #00a0a0 | | but found #00A0A0 144 | ERROR | [x] CSS colours must be defined in lowercase; expected #00a0a0 | | but found #00A0A0 152 | ERROR | [x] Multiple selectors should each be on a single line 160 | ERROR | [x] Multiple selectors should each be on a single line 190 | ERROR | [x] Closing brace of class definition must be on new line 194 | ERROR | [x] CSS colours must be defined in lowercase; expected #221e20 | | but found #221E20 194 | ERROR | [x] Closing brace of class definition must be on new line 195 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2 196 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 197 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 197 | ERROR | [x] Closing brace of class definition must be on new line 215 | ERROR | [x] Closing brace of class definition must be on new line 216 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2 217 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 218 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6 218 | ERROR | [x] Closing brace of class definition must be on new line 219 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2 220 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 221 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 222 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2 234 | ERROR | [x] CSS colours must be defined in lowercase; expected #2c2c2c | | but found #2C2C2C 244 | ERROR | [x] CSS colours must be defined in lowercase; expected #2c2c2c | | but found #2C2C2C 266 | ERROR | [x] CSS colours must be defined in lowercase; expected #221e20 | | but found #221E20 275 | ERROR | [x] CSS colours must be defined in lowercase; expected #ededed | | but found #EDEDED 281 | ERROR | [x] CSS colours must be defined in lowercase; expected #e5e6f0 | | but found #E5E6F0 282 | ERROR | [x] CSS colours must be defined in lowercase; expected #e5e6f0 | | but found #E5E6F0 283 | ERROR | [x] CSS colours must be defined in lowercase; expected #e5e6f0 | | but found #E5E6F0 287 | ERROR | [x] CSS colours must be defined in lowercase; expected #221e20 | | but found #221E20 295 | ERROR | [x] Closing brace of class definition must be on new line 296 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2 297 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 298 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 298 | ERROR | [x] Closing brace of class definition must be on new line 299 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4 300 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 301 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 301 | ERROR | [x] Closing brace of class definition must be on new line 308 | ERROR | [x] Closing brace of class definition must be on new line 309 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2 310 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 310 | ERROR | [x] Closing brace of class definition must be on new line 311 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4 312 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 313 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 314 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 315 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 315 | ERROR | [x] Closing brace of class definition must be on new line 316 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 6 317 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 8 318 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 8 318 | ERROR | [x] Closing brace of class definition must be on new line 319 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 6 320 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 8 320 | ERROR | [x] Closing brace of class definition must be on new line 321 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 6 322 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 8 323 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 8 324 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 8 325 | ERROR | [x] Line indented incorrectly; expect
I didn't pasted all the PHPCS errors and warning because it's way too many, moving this to neeeds work.
- Issue was unassigned.
- Status changed to Needs review
10 months ago 8:18pm 13 April 2024 Hello clarkssquared,
Sorry for the overlook on the remaining one, added a new commit now which targets that as well!
But I'm afraid that you have not followed "Steps to reproduce" properly, there I haven't included CSS files in PHPCS config purposefully as I find PHPCS is not the best tool to find CSS related errors and address them as well, there are other specific tools which can be well suited for this purpose like styelint or so. I've mentioned the same to you on such a similar issue https://www.drupal.org/project/january_theme/issues/3364794#comment-1554... ๐ Fix the errors/warnings reported by PHP_CodeSniffer Needs workSo here I'm not addressing the CSS issues. Though thanks for pointing out the CSS related errors, I'll try to reproduce the same by running stylelint and will provide a patch for it by creating a separate issue on it, please keep an eye on that!
This issue ticket only concerns about errors related to the following files:
php,module,inc,install,test,profile,theme,info,txt,ymlIt seems that only one file change was remaining which is the libraries.yml file as pointed out by PHPCS after applying the previous patch. Though I'm not getting any error or warning for the info.yml file which you've mentioned here.
FILE: /app/web/themes/custom/school_theme-3439389/school.libraries.yml ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 16 | ERROR | [x] Expected 1 newline at end of file; 2 found ----------------------------------------------------------------------
The new commit on the MR solves the issue as well, please have a look!
https://git.drupalcode.org/project/school_theme/-/merge_requests/31/diff...I'll be creating an issue for CSS related error real soon and address the same as well!
Hi,
I applied MR !31 and still getting some warnings and one error after executing
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,yml modules/contrib/school_theme/
FILE: /app/web/themes/contrib/school_theme/school.theme ---------------------------------------------------------------------- FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES ---------------------------------------------------------------------- 9 | WARNING | [x] Unused use statement 10 | WARNING | [x] Unused use statement 12 | WARNING | [x] Unused use statement 14 | WARNING | [x] Unused use statement 71 | WARNING | [ ] Hook implementations should not duplicate @param | | documentation 73 | WARNING | [ ] Hook implementations should not duplicate @param | | documentation ---------------------------------------------------------------------- PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ...eb/themes/contrib/school_theme/includes/flexslider/changelog.txt ---------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------- 13 | WARNING | Line exceeds 80 characters; contains 103 characters ---------------------------------------------------------------------- FILE: /app/web/themes/contrib/school_theme/PATCHES.txt ---------------------------------------------------------------------- FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES ---------------------------------------------------------------------- 1 | WARNING | [ ] Line exceeds 80 characters; contains 104 | | characters 5 | ERROR | [x] Expected 1 newline at end of file; 3 found ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: /app/web/themes/contrib/school_theme/school.info.yml ---------------------------------------------------------------------- FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE ---------------------------------------------------------------------- 1 | WARNING | Remove "project" from the info file, it will be added | | by drupal.org packaging automatically 1 | WARNING | Remove "datestamp" from the info file, it will be | | added by drupal.org packaging automatically 1 | WARNING | Remove "version" from the info file, it will be added | | by drupal.org packaging automatically ----------------------------------------------------------------------
- Status changed to Needs work
8 months ago 9:09am 29 May 2024 - ๐ฎ๐ณIndia dev16.addweb
silvi.addweb โ made their first commit to this issueโs fork.
- Status changed to Needs review
8 months ago 11:45am 30 May 2024 - ๐ฎ๐ณIndia dev16.addweb
Hi, I have fix remaining phpcs issues, Please review.
- Status changed to RTBC
8 months ago 4:08pm 30 May 2024 Hi, I have reviewed the changes and the MR applies cleanly.
Moving to RTBC+