- Issue created by @sidharth_soman
- Status changed to Needs work
almost 2 years ago 9:59am 15 February 2023 - š®š³India sidharth_soman Bangalore
Finding the following issues using php codesniffer. I will work on them.
C:\xampp\htdocs\backendassignment\web\modules\contrib>phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig views_semantic_tabs-3341851 FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_semantic_tabs-3341851\css\views-semantic-tabs.css ------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------- 1 | ERROR | [x] Expected 1 newline at end of file; 0 found ------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------- FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_semantic_tabs-3341851\README.md ------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------------------------------- 14 | WARNING | Line exceeds 80 characters; contains 83 characters ------------------------------------------------------------------------------------------------- FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_semantic_tabs-3341851\src\Plugin\views\style\ViewsSemanticTabs.php ------------------------------------------------------------------------------------------------------------------------------------ FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 6 LINES ------------------------------------------------------------------------------------------------------------------------------------ 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n" 49 | WARNING | [x] A comma should follow the last multiline array item. Found: ) 77 | ERROR | [x] Doc comment short description must end with a full stop 84 | WARNING | [x] A comma should follow the last multiline array item. Found: ] 87 | ERROR | [x] Expected 1 blank line after function; 0 found 88 | ERROR | [x] The closing brace for the class must have an empty line before it ------------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------ FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_semantic_tabs-3341851\views_semantic_tabs.install ------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------- 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n" ------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------- FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_semantic_tabs-3341851\views_semantic_tabs.module ------------------------------------------------------------------------------------------------------------------------------ FOUND 12 ERRORS AND 5 WARNINGS AFFECTING 12 LINES ------------------------------------------------------------------------------------------------------------------------------ 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n" 37 | ERROR | [ ] Type hint "array" missing for $variables 66 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3 67 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses 72 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses 75 | WARNING | [x] A comma should follow the last multiline array item. Found: 'views-semantic-tabs' 80 | WARNING | [x] 'todo : hide group field from row content' should match the format '@todo Fix problem X here.' 80 | ERROR | [x] Inline comments must start with a capital letter 83 | ERROR | [ ] Comment indentation error, expected only 1 spaces 85 | ERROR | [ ] Comment indentation error, expected only 2 spaces 86 | WARNING | [x] There must be no blank line following an inline comment 86 | WARNING | [ ] There must be no blank line following an inline comment 86 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses 88 | WARNING | [x] 'todo : group field value should be plain text' should match the format '@todo Fix problem X here.' 88 | ERROR | [x] Inline comments must start with a capital letter 88 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses 98 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses ------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------ Time: 557ms; Memory: 6MB
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 10:14am 15 February 2023 - š®š³India sidharth_soman Bangalore
I have solved all the above issues and made an MR for the same. Please review.
- Assigned to annmarysruthy
- Issue was unassigned.
- First commit to issue fork.
- š§š·Brazil mabho Rio de Janeiro, RJ
@sidharth_soman, I have tested your changes and they seem to be working all right. Thank you for taking the time to apply the code standard changes.
Do you mind reviewing and applying changes (the same way you did here) to the 4.0.x branch, since that is the latest dev version?
Thank you so much in advance.
- Status changed to Needs work
3 months ago 5:40am 20 August 2024 - šµšPhilippines cleavinjosh
Hi @sidharth_soman,
I applied MR!7 on 4.0.x branch and it was not applied smoothly.
ā views_semantic_tabs git:(4.0.x) curl https://git.drupalcode.org/project/views_semantic_tabs/-/merge_requests/7.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 5529 0 5529 0 0 8270 0 --:--:-- --:--:-- --:--:-- 8276 patching file README.md patching file css/views-semantic-tabs.css patching file src/Plugin/views/style/ViewsSemanticTabs.php Hunk #2 succeeded at 62 (offset -12 lines). patching file views_semantic_tabs.install patching file views_semantic_tabs.module Hunk #2 FAILED at 63. Hunk #3 succeeded at 89 (offset -5 lines). 1 out of 3 hunks FAILED -- saving rejects to file views_semantic_tabs.module.rej ā views_semantic_tabs git:(4.0.x) ā .. ā contrib phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml views_semantic_tabs FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/views_semantic_tabs/css/views-semantic-tabs.css -------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------------------- 1 | ERROR | [x] Additional whitespace found at start of file -------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/views_semantic_tabs/views_semantic_tabs.module ------------------------------------------------------------------------------------------------------------------------------ FOUND 9 ERRORS AND 5 WARNINGS AFFECTING 9 LINES ------------------------------------------------------------------------------------------------------------------------------ 58 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3 59 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses 67 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses 70 | WARNING | [x] A comma should follow the last multiline array item. Found: 'views-semantic-tabs' 75 | WARNING | [x] 'todo : hide group field from row content' should match the format '@todo Fix problem X here.' 75 | ERROR | [x] Inline comments must start with a capital letter 78 | ERROR | [ ] Comment indentation error, expected only 1 spaces 80 | ERROR | [ ] Comment indentation error, expected only 2 spaces 81 | WARNING | [x] There must be no blank line following an inline comment 81 | WARNING | [ ] There must be no blank line following an inline comment 81 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses 83 | WARNING | [x] 'todo : group field value should be plain text' should match the format '@todo Fix problem X here.' 83 | ERROR | [x] Inline comments must start with a capital letter 83 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses ------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------ Time: 117ms; Memory: 10MB ā contrib
ā views_semantic_tabs git:(4.0.x) curl https://git.drupalcode.org/project/views_semantic_tabs/-/merge_requests/7.diff | git apply -v % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 5529 0 5529 0 0 8528 0 --:--:-- --:--:-- --:--:-- 8532 Checking patch README.md... Checking patch css/views-semantic-tabs.css... error: while searching for: error: patch failed: css/views-semantic-tabs.css:0 error: css/views-semantic-tabs.css: patch does not apply Checking patch src/Plugin/views/style/ViewsSemanticTabs.php... Hunk #2 succeeded at 62 (offset -12 lines). Checking patch views_semantic_tabs.install... Checking patch views_semantic_tabs.module... error: while searching for: // Attach our library. $variables['view']->element['#attached']['library'][] = 'views_semantic_tabs/views-semantic-tabs'; $variables['#attached']['library'][] = 'user/drupal.user'; // Get first group field selected if ($options) { $first_group_field = $options['group']; } // Add tabs id and class to main div $variables['attributes'] = new Attribute([ 'id' => $unique_id, 'class' => 'views-semantic-tabs' ]); $variables['default_row_class'] = !empty($options['default_row_class']); foreach ($rows as $id => $row) { // todo : hide group field from row content // Skip building the attributes and content if the field is to be excluded // from the display. // $fields[$first_group_field]->options['exclude'] = ture; // if (!empty($fields[$first_group_field]->options['exclude'])) { // continue; // } // todo : group field value should be plain text $field_output = $handler->getField($id, $first_group_field); $variables['rows']['group'][] = $field_output; $variables['rows'][$id] = []; error: patch failed: views_semantic_tabs.module:63 error: views_semantic_tabs.module: patch does not apply ā views_semantic_tabs git:(4.0.x)
Please check and advise.
Thank you. - Status changed to RTBC
3 months ago 7:22am 21 August 2024 - š®š¹Italy apaderno Brescia, š®š¹
- Merge request !11Created a new merge request to get the list of all the PHP_CodeSniffer errors/warnings to fix ā (Open) created by apaderno