- Issue created by @apaderno
- Merge request !10Issue #3416982: Fix the errors/warnings reported by PHP_CodeSniffer ā (Open) created by apaderno
- Status changed to Needs review
10 months ago 2:41pm 25 January 2024 - š®š¹Italy apaderno Brescia, š®š¹
I fixed almost all the warnings/errors.
- Status changed to Needs work
10 months ago 2:42pm 25 January 2024 - š®š¹Italy apaderno Brescia, š®š¹
(Actually, the status must be Needs work, since there should be a couple of warnings/errors to fix.)
- First commit to issue fork.
- Status changed to Needs review
10 months ago 4:02pm 25 January 2024 - Status changed to Needs work
10 months ago 6:17am 26 January 2024 - šµšPhilippines clarkssquared
Hi
I applied the MR !10 in my local and I noticed that there are still many PHPCS issues being reported
ā y_donate git:(2.0.x) curl https://git.drupalcode.org/project/y_donate/-/merge_requests/10.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 13769 0 13769 0 0 25553 0 --:--:-- --:--:-- --:--:-- 25833 patching file README.md patching file 'modules/lb_donate/lb_donate.info.yml' patching file 'modules/lb_donate/lb_donate.install' patching file 'modules/lb_donate/lb_donate.module' patching file 'src/Plugin/Block/DonateFormBlock.php' patching file y_donate.module ā y_donate git:(2.0.x) ā .. ā contrib git:(master) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml y_donate FILE: .../d9-local/web/modules/contrib/y_donate/modules/lb_donate/lb_donate.install -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 74 | WARNING | Line exceeds 80 characters; contains 83 characters -------------------------------------------------------------------------------- FILE: ...al/web/modules/contrib/y_donate/modules/lb_donate/assets/css/lb-donate.css -------------------------------------------------------------------------------- FOUND 125 ERRORS AFFECTING 99 LINES -------------------------------------------------------------------------------- 2 | ERROR | [x] CSS colours must be defined in lowercase; expected #4f4f4f | | but found #4F4F4F 3 | ERROR | [x] Closing brace of class definition must be on new line 12 | ERROR | [x] CSS colours must be defined in lowercase; expected #4f4f4f | | but found #4F4F4F 13 | ERROR | [x] Closing brace of class definition must be on new line 14 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2 15 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 15 | ERROR | [x] Closing brace of class definition must be on new line 16 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4 17 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 18 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8 19 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8 20 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8 21 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8 22 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8 23 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8 24 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8 25 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8 25 | ERROR | [x] Closing brace of class definition must be on new line 26 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2 27 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 28 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 29 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 30 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 31 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 32 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 33 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 33 | ERROR | [x] Closing brace of class definition must be on new line 34 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4 35 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 36 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8 37 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8 37 | ERROR | [x] Closing brace of class definition must be on new line 38 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4 39 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 40 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 41 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 42 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 43 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 44 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 44 | ERROR | [x] Closing brace of class definition must be on new line 45 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 6 46 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 8 47 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 10 48 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 10 49 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 10 49 | ERROR | [x] Closing brace of class definition must be on new line 50 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2 51 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 52 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6 52 | ERROR | [x] Closing brace of class definition must be on new line 53 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2 54 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 55 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 56 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 57 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 58 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 58 | ERROR | [x] Closing brace of class definition must be on new line 59 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4 60 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 61 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8 62 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8 63 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8 64 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8 64 | ERROR | [x] Closing brace of class definition must be on new line 65 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2 66 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 66 | ERROR | [x] Closing brace of class definition must be on new line 67 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4 68 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 69 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 69 | ERROR | [x] Closing brace of class definition must be on new line 70 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 6 71 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 8 72 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 10 73 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 10 73 | ERROR | [x] Closing brace of class definition must be on new line 74 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4 75 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 76 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 76 | ERROR | [x] Closing brace of class definition must be on new line 77 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2 78 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 79 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 80 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 81 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 81 | ERROR | [x] Closing brace of class definition must be on new line 82 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2 83 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 84 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 85 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 86 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 87 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 88 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 88 | ERROR | [x] Closing brace of class definition must be on new line 89 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4 90 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 91 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8 92 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8 93 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8 93 | ERROR | [x] Closing brace of class definition must be on new line 94 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4 95 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 95 | ERROR | [x] CSS colours must be defined in lowercase; expected #4f4f4f | | but found #4F4F4F 96 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 97 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 97 | ERROR | [x] CSS colours must be defined in lowercase; expected #4f4f4f | | but found #4F4F4F 97 | ERROR | [x] Closing brace of class definition must be on new line 98 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 6 99 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 8 100 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 8 100 | ERROR | [x] CSS colours must be defined in lowercase; expected #4f4f4f | | but found #4F4F4F 100 | ERROR | [x] Closing brace of class definition must be on new line 101 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2 102 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 103 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 103 | ERROR | [x] CSS colours must be defined in lowercase; expected #4f4f4f | | but found #4F4F4F 104 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 104 | ERROR | [x] CSS colours must be defined in lowercase; expected #4f4f4f | | but found #4F4F4F 104 | ERROR | [x] Closing brace of class definition must be on new line 105 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4 106 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 106 | ERROR | [x] CSS colours must be defined in lowercase; expected #4f4f4f | | but found #4F4F4F 107 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6 107 | ERROR | [x] Closing brace of class definition must be on new line 109 | ERROR | [x] Expected 1 newline at end of file; 0 found -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 125 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...d9-local/web/modules/contrib/y_donate/src/Plugin/Block/DonateFormBlock.php -------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 1 LINE -------------------------------------------------------------------------------- 31 | ERROR | Parameter $module_handler is not described in comment 31 | ERROR | Parameter $route_match is not described in comment -------------------------------------------------------------------------------- Time: 306ms; Memory: 10MB ā contrib git:(master) ā
- šµšPhilippines clarkssquared
the css errors can be ignored since it was mentioned in the issue's description?
- Status changed to Needs review
10 months ago 12:02pm 26 January 2024 - š®š¹Italy apaderno Brescia, š®š¹
The issue summary explains why the .css files are ignored: They are automatically generated. One of the project maintainers already made clear they will not correct them.
I avoided to check the .css files since they are dynamically generated from https://git.drupalcode.org/issue/y_donate-3373804/-/blob/3373804-fix-the....
I did not change the short description of the update hook because it is not possible to short Migrate content from 'lb_donate_giving_amount' paragraph to 'donate_item' block. which must still be written on a single line (since it is a short description).