- Issue created by @sunil jolapara
- Merge request !2Resolve #3475452 "Fix the phpcodesniffer issues" → (Open) created by sunil jolapara
- Status changed to Needs review
2 months ago 7:40am 19 September 2024 - 🇺🇸United States sunil jolapara 3265 Summitrun Drive, Independence, KY, 41051
- 🇮🇹Italy apaderno Brescia, 🇮🇹
The issue summary for PHP_CodeSniffer issues should always show the report given from PHP_CodeSniffer and the arguments passed to
phpcs
.Furthermore, since GitLab CI is now enabled for all the projects, GitLab CI should be used to get PHP_CodeSniffer errors/warnings.
- Merge request !3Created a new merge request to get the list of all the PHP_CodeSniffer errors/warnings to fix → (Open) created by apaderno
- 🇮🇹Italy apaderno Brescia, 🇮🇹
avpaderno → changed the visibility of the branch 3475452-gitlab-ci-reports to hidden.
- First commit to issue fork.
- 🇵ðŸ‡Philippines cleavinjosh
Hi,
Gitlab CI found no phpcs errors
However, I am seeing errors when I ran
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml
on terminal:➜ contrib git:(main) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml menu_normalizer FILE: /Users/interns/Demo-site/drupal_11_test/install-dir/drupal_11_test_site/web/modules/contrib/menu_normalizer/tests/src/Unit/MenuLinkTreeNormalizerTest.php --------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE --------------------------------------------------------------------------------------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\menu_normalizer\Normalizer\MenuLinkTreeNormalizer. --------------------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal_11_test/install-dir/drupal_11_test_site/web/modules/contrib/menu_normalizer/tests/src/Unit/MenuLinkNormalizerTest.php ----------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\menu_normalizer\Normalizer\MenuLinkNormalizer. ----------------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------------------------------------------------------------- Time: 214ms; Memory: 10MB
Fixing it in the terminal will cause the error to appear in the Gitlab CI and vice versa.
Please check and advise.
Thank you. - 🇮🇹Italy apaderno Brescia, 🇮🇹
It depends from the PHP_CodeSniffer settings. If GitLab CI does not report errors/warnings, nothing should be changed.