- Issue created by @sunil jolapara
- Merge request !3Resolve #3477772 "Fix the issues reported by phpcodesniffer" ā (Open) created by sunil jolapara
- šŗšø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.
- First commit to issue fork.
- Merge request !4Created a new merge request to get the list of all the PHP_CodeSniffer errors/warnings to fix ā (Open) created by cleavinjosh
- šµšPhilippines cleavinjosh
cleavinjosh ā changed the visibility of the branch 3477772-phpcs-issues to hidden.
- šµšPhilippines cleavinjosh
Hi,
Found some phpcs issues after I ran
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml
:ā contrib git:(main) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml xnttxml FILE: /Users/interns/Demo-site/drupal_11_test/install-dir/drupal_11_test_site/web/modules/contrib/xnttxml/src/Plugin/ExternalEntities/StorageClient/XmlFiles.php ---------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES ---------------------------------------------------------------------------------------------------------------------------------------------------------------- 38 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 150 | WARNING | [ ] Unused variable $id. 151 | WARNING | [ ] Unused variable $entity_xml. ---------------------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------------------------------------------------------------------------------------------- Time: 202ms; Memory: 10MB ā contrib git:(main) ā
- šµšPhilippines cleavinjosh
Hi,
Please review, check, and advise on MR!3.
Thank you.
- š«š·France guignonv
Thanks. The pipeline is not passing. Could you turn "^3.0@beta1" into "^3.0@beta" to see if it is better? I made a mistake by adding the beta version. I also saw some misspelling I made reported by the pipeline, could you have a look as well?
Also, why adding ".gitlab-ci.yml"? Could you explain in simple words what new features it brings to me? I did not use CI here and I was fine but I'm open to changes as long as I got good arguments.
I appreciate your work but reviewing issues that just bring cosmetic changes takes time and sometimes, it's faster for me to just use the code sniffer on my dev environment and do the changes by myself. This module is at a beta stage and not my priority at the moment. I may not have processed it through the latest version of PHP CS but I will for next release. To accept those changes, I really need to feel like it saves me time and helps me. So, while the time you spent is appreciated, it might not be the most efficient way to help improving this module. No offense behind that, it's just that you may not guess it if I don't tell you.
- š®š¹Italy apaderno Brescia, š®š¹
Also, why adding ".gitlab-ci.yml"?
That is the file that enable GitLab CI, which reports PHP_CodeSniffer warnings/errors, among other things.
- š®š¹Italy apaderno Brescia, š®š¹
In other words, that file is necessary to verify that the reported PHP_CodeSniffer errors/warnings are the correct ones to fix.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml
would report more issues than GitLab CI, which also means more issues than the ones that should be fixed.