- Issue created by @Prachi6824
- Assigned to Prachi6824
- Status changed to Needs review
over 1 year ago 9:22am 29 June 2023 - ๐ฎ๐ณIndia Prachi6824
Hello,
I have created a patch to solve all the errors related to phpcs within the module
Please review and apply it .
- Issue was unassigned.
- Status changed to Needs work
over 1 year ago 11:38pm 29 June 2023 - ๐ต๐ญPhilippines paraderojether
Hi @prachi6824
I reviewed patch #2 and there are still remaining issues reported by phpcs shown below:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig tmgmt_openai
FILE: ...denttrainees/Drupal/drupalorg-issues-site/docroot/modules/contrib/tmgmt_openai/tmgmt_openai.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: /Users/studenttrainees/Drupal/drupalorg-issues-site/docroot/modules/contrib/tmgmt_openai/README.md -------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------- 47 | WARNING | Line exceeds 80 characters; contains 84 characters -------------------------------------------------------------------------------------------------------- FILE: ...rainees/Drupal/drupalorg-issues-site/docroot/modules/contrib/tmgmt_openai/src/OpenAiTranslatorUi.php ---------------------------------------------------------------------------------------------------------- FOUND 8 ERRORS AND 1 WARNING AFFECTING 9 LINES ---------------------------------------------------------------------------------------------------------- 15 | ERROR | [ ] Missing @var tag in member variable comment 20 | ERROR | [x] Expected 1 space after "=>"; 0 found 30 | WARNING | [x] A comma should follow the last multiline array item. Found: ] 42 | ERROR | [x] Short array syntax must be used to define arrays 52 | ERROR | [x] Short array syntax must be used to define arrays 59 | ERROR | [x] Short array syntax must be used to define arrays 69 | ERROR | [x] Short array syntax must be used to define arrays 80 | ERROR | [x] Short array syntax must be used to define arrays 94 | ERROR | [x] Short array syntax must be used to define arrays ---------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------------------------------------- FILE: ...rg-issues-site/docroot/modules/contrib/tmgmt_openai/src/Plugin/tmgmt/Translator/OpenAiTranslator.php ---------------------------------------------------------------------------------------------------------- FOUND 27 ERRORS AND 4 WARNINGS AFFECTING 30 LINES ---------------------------------------------------------------------------------------------------------- 16 | ERROR | [x] When importing a class with "use", do not include a leading \ 45 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 46 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found 47 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found 48 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found 49 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found 50 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found 51 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found 52 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found 53 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found 54 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found 55 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found 56 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found 84 | WARNING | [x] A comma should follow the last multiline array item. Found: ) 101 | ERROR | [x] Data types in @param tags need to be fully namespaced 118 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters 130 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters 141 | ERROR | [x] Short array syntax must be used to define arrays 154 | ERROR | [x] Data types in @param tags need to be fully namespaced 157 | ERROR | [x] Parameter comment must end with a full stop 161 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters 163 | ERROR | [ ] Return type "array object" must not contain spaces 166 | ERROR | [x] Data types in @throws tags need to be fully namespaced 167 | ERROR | [ ] @throws tag comment must end with a full stop 171 | ERROR | [x] Short array syntax must be used to define arrays 171 | ERROR | [x] Short array syntax must be used to define arrays 173 | ERROR | [x] Short array syntax must be used to define arrays 188 | ERROR | [ ] The array declaration extends to column 142 (the limit is 80). The array content | | should be split up over multiple lines 190 | ERROR | [x] Whitespace found at end of line 233 | ERROR | [x] Object operator not indented correctly; expected 10 spaces but found 12 237 | ERROR | [x] Short array syntax must be used to define arrays ---------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 25 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------------------------------------- Time: 438ms; Memory: 12MB
Please check.
Thank you. - Assigned to nitin_lama
- ๐ฎ๐ณIndia nitin_lama India
Addressed #3, Updated patch.
Errors/warning remaining are:
I think we can ignore these warning. Please review.
- Status changed to Needs review
over 1 year ago 9:36am 30 June 2023 - Issue was unassigned.
- Status changed to Needs work
about 1 year ago 11:44pm 6 September 2023 - First commit to issue fork.
- Status changed to Needs review
about 1 year ago 2:30am 8 September 2023 - Status changed to Needs work
about 1 year ago 7:22am 8 September 2023 - First commit to issue fork.
- Assigned to nitin_lama
- Issue was unassigned.
Venkatraman Ganesan โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia zkhan.aamir
Hi,
MR #19 applied successfully.
Admin@DESKTOP-252TO6V MINGW64 ~/Desktop/projects/drupal/web/modules/tmgmt_openai (1.0.x) $ curl https://git.drupalcode.org/project/tmgmt_openai/-/merge_requests/1.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4127 0 4127 0 0 4848 0 --:--:-- --:--:-- --:--:-- 4861 patching file src/OpenAiTranslatorUi.php patching file src/Plugin/tmgmt/Translator/OpenAiTranslator.php patching file tmgmt_openai.install
Still some errors remaining.
Admin@DESKTOP-252TO6V MINGW64 ~/Desktop/projects/drupal/web/modules $ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,js,yml tmgmt_openai/ FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\tmgmt_openai\README.md ------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------------- 47 | WARNING | Line exceeds 80 characters; contains 84 characters ------------------------------------------------------------------------------- FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\tmgmt_openai\src\Plugin\tmgmt\Translator\OpenAiTranslator.php ---------------------------------------------------------------------------------------------------------------------- FOUND 13 ERRORS AFFECTING 13 LINES ---------------------------------------------------------------------------------------------------------------------- 129 | ERROR | Missing parameter comment 130 | ERROR | Missing parameter comment 132 | ERROR | Description for the @return value must be on the next line 164 | ERROR | Missing parameter comment 165 | ERROR | Missing parameter comment 167 | ERROR | Description for the @return value must be on the next line 197 | ERROR | Doc comment is empty 213 | ERROR | Doc comment is empty 220 | ERROR | Doc comment is empty 230 | ERROR | Description for the @return value must be on the next line 245 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph 258 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph 296 | ERROR | @throws tag comment must end with a full stop ---------------------------------------------------------------------------------------------------------------------- FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\tmgmt_openai\tmgmt_openai.info.yml ---------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------------------------------- 6 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:" ---------------------------------------------------------------------------------------------- FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\tmgmt_openai\tmgmt_openai.install ------------------------------------------------------------------------------------------ FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------------------------ 14 | WARNING | Line exceeds 80 characters; contains 119 characters ------------------------------------------------------------------------------------------ Time: 331ms; Memory: 12MB
- ๐ฎ๐ณIndia Anjali Mehta
Anjali Mehta โ made their first commit to this issueโs fork.
- First commit to issue fork.
- First commit to issue fork.
- Status changed to Needs review
9 months ago 4:49am 15 February 2024 - Status changed to Needs work
9 months ago 11:28am 5 March 2024 - ๐ฎ๐ณIndia Shank115
I ran phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml tmgmt_openai and found these errors:
FILE: /home/sites/tmgmt_openai/src/Plugin/tmgmt/Translator/OpenAiTranslator.php ----------------------------------------------------------------------------------------------------------------------- FOUND 19 ERRORS AFFECTING 17 LINES ----------------------------------------------------------------------------------------------------------------------- 37 | ERROR | [x] Additional blank lines found at end of doc comment 43 | ERROR | [x] Additional blank lines found at end of doc comment 131 | ERROR | [ ] Missing parameter comment 132 | ERROR | [ ] Missing parameter comment 133 | ERROR | [x] Separate the @param and @return sections by a blank line. 133 | ERROR | [ ] Description for the @return value must be on the next line 165 | ERROR | [ ] Missing parameter comment 166 | ERROR | [ ] Missing parameter comment 167 | ERROR | [x] Separate the @param and @return sections by a blank line. 167 | ERROR | [ ] Description for the @return value must be on the next line 197 | ERROR | [x] Missing function doc comment 210 | ERROR | [x] Missing function doc comment 214 | ERROR | [x] Missing function doc comment 221 | ERROR | [ ] Description for the @return value must be on the next line 236 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph 249 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph 276 | ERROR | [x] Parameter comment must end with a full stop 287 | ERROR | [ ] @throws tag comment must end with a full stop 415 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces ----------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------------------------- FILE: /home/sites/tmgmt_openai/src/OpenAiTranslatorUi.php ------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------- 16 | ERROR | [x] Do not append variable name "$models" to the type declaration in a member variable comment ------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------- FILE: /home/sites/tmgmt_openai/tmgmt_openai.install ------------------------------------------------------------------------------------------------------------------------------ FOUND 7 ERRORS AND 2 WARNINGS AFFECTING 7 LINES ------------------------------------------------------------------------------------------------------------------------------ 3 | ERROR | [x] The open comment tag must be the only content on the line 4 | ERROR | [x] The second line in the file doc comment must be "@file" 4 | ERROR | [x] Function comment short description must start with exactly one space 5 | ERROR | [ ] Wrong function doc comment end; expected "*/", found "**/" 7 | WARNING | [x] Unused use statement 11 | ERROR | [x] There must be no blank lines after the function comment 14 | ERROR | [x] Opening brace should be on the same line as the declaration 17 | WARNING | [ ] Line exceeds 80 characters; contains 118 characters 17 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses ------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------ FILE: /home/sites/tmgmt_openai/README.md ---------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------- 47 | WARNING | Line exceeds 80 characters; contains 84 characters ----------------------------------------------------------------------
- First commit to issue fork.
- ๐ฎ๐ณIndia zkhan.aamir
Hi,
MR #26 applied successfully.
$ curl https://git.drupalcode.org/project/tmgmt_openai/-/merge_requests/1.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 7516 0 7516 0 0 15117 0 --:--:-- --:--:-- --:--:-- 15153 patching file README.md patching file src/OpenAiTranslatorUi.php patching file src/Plugin/tmgmt/Translator/OpenAiTranslator.php patching file tmgmt_openai.install
Still some errors remaining.
$ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml tmgmt_openai/ FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\tmgmt_openai\src\Plugin\tmgmt\Translator\OpenAiTranslator.php ---------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES ---------------------------------------------------------------------------------------------------------------------- 255 | WARNING | Line exceeds 80 characters; contains 85 characters 267 | WARNING | Line exceeds 80 characters; contains 85 characters ---------------------------------------------------------------------------------------------------------------------- FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\tmgmt_openai\tmgmt_openai.info.yml ---------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------------------------------- 6 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:" ---------------------------------------------------------------------------------------------- FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\tmgmt_openai\tmgmt_openai.install ------------------------------------------------------------------------------------------ FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------------------------ 14 | WARNING | Line exceeds 80 characters; contains 119 characters ------------------------------------------------------------------------------------------ Time: 333ms; Memory: 12MB
- ๐ฎ๐ณIndia sakthi_dev
Couldn't find any issues. Please refer the screenshot.
Arijit Acharya โ made their first commit to this issueโs fork.
- Merge request !103371272-fix-phpcs-issue: Fixed the remaining phpcs issue. โ (Open) created by arijit acharya
I encountered some of the warnings, listing them below. I also created a MR to fix them.
Sorry there has been a type in creating the branch, the issue id anyhow got missed in the branch name while creating the branch. It was not intensional, I regret for it.
Kindly review and merge.FILE: ...app/web/modules/custom/tmgmt_openai-3371272/tmgmt_openai.install ---------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------- 14 | WARNING | Line exceeds 80 characters; contains 119 characters ---------------------------------------------------------------------- FILE: ...pp/web/modules/custom/tmgmt_openai-3371272/tmgmt_openai.info.yml ---------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------- 6 | WARNING | All dependencies must be prefixed with the project | | name, for example "drupal:" ---------------------------------------------------------------------- FILE: ..._openai-3371272/src/Plugin/tmgmt/Translator/OpenAiTranslator.php ---------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES ---------------------------------------------------------------------- 255 | WARNING | Line exceeds 80 characters; contains 85 characters 267 | WARNING | Line exceeds 80 characters; contains 85 characters ----------------------------------------------------------------------
- Status changed to Needs review
6 months ago 6:55am 4 June 2024 - ๐ต๐ญPhilippines paraderojether
Hi
I reviewed MR!10, and confirmed it fixes the issues reported by phpcs.
tmgmt_openai curl https://git.drupalcode.org/project/tmgmt_openai/-/merge_requests/10.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 7849 0 7849 0 0 24386 0 --:--:-- --:--:-- --:--:-- 24917 patching file README.md patching file 'src/OpenAiTranslatorUi.php' patching file 'src/Plugin/tmgmt/Translator/OpenAiTranslator.php' patching file tmgmt_openai.info.yml patching file tmgmt_openai.install โ tmgmt_openai cd .. โ contrib phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig tmgmt_openai โ contrib
Moving this to RBTC.
Thank you. - Status changed to RTBC
6 months ago 7:48am 4 June 2024 - Status changed to Needs work
4 months ago 8:02am 7 August 2024 - ๐ฎ๐ณIndia sourav_paul Kolkata
After applying patch, still found some phpcs warnings...
hence, reopening this issue.Sharing ss:
- Status changed to RTBC
4 months ago 9:14am 7 August 2024 - ๐ฌ๐งUnited Kingdom scott_euser
Merged at https://www.drupal.org/project/ai_tmgmt โ , granted credit there.
Thanks all! - Status changed to Closed: outdated
about 1 month ago 5:41am 11 October 2024 - ๐ฌ๐งUnited Kingdom scott_euser
And the specific issue credited ๐ Add gitlab CI and fix issues Active