Problem/Motivation
FILE: ...al_11_test/install-dir/drupal_11_test_site/web/modules/contrib/fireworksai/modules/ai_interpolator_fireworks/src/Plugin/AiInterpolatorFieldRules/FireworksaiEntityReference.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
27 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
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/fireworksai/src/Plugin/AiProvider/FireworksProvider.php
---------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------------
254 | ERROR | [ ] Parameter $capabilities is not described in comment
256 | ERROR | [ ] Doc comment short description must end with a full stop
256 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
257 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
269 | ERROR | [x] No space found before comment text; expected "// return $cache_data->data;" but found "//return $cache_data->data;"
269 | ERROR | [x] Inline comments must start with a capital letter
269 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
---------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/interns/Demo-site/drupal_11_test/install-dir/drupal_11_test_site/web/modules/contrib/fireworksai/src/FireworksaiApi.php
------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------
Time: 1.84 secs; Memory: 12MB
Steps to reproduce
Run the phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml command to get the drupal coding standard issues.
Proposed resolution
Many of the issues can be fixed by running the phpcbf command. For the remaining ones, we will need to manually address and then commit these changes before pushing them.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | fixed-phpcs.png | 41.44 KB | sarwan_verma |
Issue fork fireworksai-3476613
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
sunil jolapara commentedComment #4
sarwan_verma commentedHi,
I have tested MR!1 for the PHP_CodeSniffer issue, and it is working fine. I have also attached a screenshot and moved it to RTBC++.
Thanks!
Comment #5
avpadernoThe 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.
Comment #6
cleavinjosh commentedComment #7
cleavinjosh commentedComment #8
cleavinjosh commentedComment #9
cleavinjosh commentedHi @sunil jolapara,
Thank you for providing an MR. I applied MR!1, it was applied smoothly and fixed all the phpcs issues.
Thank you.
Comment #11
cleavinjosh commentedList of phpcs issues found by Gitlab CI before the changes.
Comment #13
cleavinjosh commentedList of phpcs issues found by Gitlab CI after the changes.
Comment #14
cleavinjosh commentedGitlab CI found no phpcs errors.
Comment #15
cleavinjosh commentedHi,
Please review, check, and advise on MR!1.
Thank you.
Comment #17
marcus_johansson commentedThank you all of you, I fixed the remaining issues myself and its merged.