- Issue created by @sonam_sharma
- First commit to issue fork.
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 11:26am 22 June 2023 - Assigned to sonam_sharma
I have fixed missing function doc also which is error not a warning
kindly please review the patch!- Issue was unassigned.
- Status changed to Needs work
over 1 year ago 10:04am 3 July 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
The issue summary should always describe what the issue is trying to fix and, in the case of coding standards issues, show which command and arguments have been used and which report that command shown. In this way, project maintainers can verify the patch/MR fixes all the warnings/errors.
- Status changed to Needs review
over 1 year ago 12:50pm 10 July 2023 - Status changed to Needs work
over 1 year ago 1:57pm 10 July 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
+/** + * Implements template_preprocess_hook(). + */ function template_preprocess_views_zurb_block_grid(array &$vars) {
The correct documentation comment is similar to the one used for
template_preprocess_node()
, for example./** * Prepares variables for node templates. * * Default template: node.html.twig. * * Most themes use their own copy of node.html.twig. The default is located * inside "/core/modules/node/templates/node.html.twig". Look in there for the * full list of variables. * * By default this function performs special preprocessing of some base fields * so they are available as variables in the template. For example 'title' * appears as 'label'. This preprocessing is skipped if: * - a module makes the field's display configurable via the field UI by means * of BaseFieldDefinition::setDisplayConfigurable() * - AND the additional entity type property * 'enable_base_field_custom_preprocess_skipping' has been set using * hook_entity_type_build(). * * @param array $variables * An associative array containing: * - elements: An array of elements to display in view mode. * - node: The node object. * - view_mode: View mode; e.g., 'full', 'teaser', etc. * * @see hook_entity_type_build() * @see \Drupal\Core\Field\BaseFieldDefinition::setDisplayConfigurable() */
If then I run the command reported in the issue summary, I get more warnings/errors.
FILE: ./zurb_views/views_zurb.theme.inc ------------------------------------------------------------------------- FOUND 3 ERRORS AND 3 WARNINGS AFFECTING 5 LINES ------------------------------------------------------------------------- 9 | WARNING | [x] Unused use statement 9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Template\Attribute. 35 | WARNING | [x] '@TODO: This would be better as valdiation errors on the style plugin options form.' should match the format | | '@todo Fix problem X here.' 43 | WARNING | [x] '@TODO: Make sure that $vars['rows'] is rendered array.' should match the format '@todo Fix problem X here.' 48 | ERROR | [x] Missing function doc comment 63 | ERROR | [x] Expected 1 newline at end of file; 2 found ------------------------------------------------------------------------- PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------- FILE: ./zurb_views/views_zurb.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: ./zurb_views/src/ViewsZurb.php ------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES ------------------------------------------------------------------------- 35 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines 38 | ERROR | [x] Expected 1 blank line after function; 2 found ------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------- FILE: ./zurb_views/src/Plugin/views/style/ViewsZurbAccordion.php ------------------------------------------------------------------------- FOUND 5 ERRORS AND 10 WARNINGS AFFECTING 15 LINES ------------------------------------------------------------------------- 7 | WARNING | [x] Unused use statement 65 | ERROR | [x] Short array syntax must be used to define arrays 66 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead 67 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead 69 | ERROR | [x] Short array syntax must be used to define arrays 71 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead 73 | ERROR | [x] Short array syntax must be used to define arrays 75 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead 78 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead 80 | ERROR | [x] Short array syntax must be used to define arrays 82 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead 85 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead 87 | ERROR | [x] Short array syntax must be used to define arrays 89 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead 92 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead ------------------------------------------------------------------------- PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------- FILE: ./zurb_views/src/Plugin/views/style/ViewsZurbBlockGrid.php ------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES ------------------------------------------------------------------------- 74 | ERROR | [x] Use null coalesce operator instead of ternary operator. 91 | ERROR | [x] Use null coalesce operator instead of ternary operator. ------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------- FILE: ./zurb_views/templates/views-zurb-block-grid.html.twig ------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------- 26 | ERROR | [x] Expected 1 newline at end of file; 0 found ------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------- FILE: ./zurb_views/README.md ------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------- 44 | WARNING | Line exceeds 80 characters; contains 86 characters ------------------------------------------------------------------------- FILE: ./zurb_views/views_zurb.module ------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES ------------------------------------------------------------------------- 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line 13 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name, found "views_bootstrap_help" but | | expected "views_zurb_views_bootstrap_help" ------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------- Time: 101ms; Memory: 10MB
- Status changed to Needs review
about 1 year ago 6:53am 10 October 2023 - Status changed to Needs work
about 1 year ago 11:58am 11 October 2023 - ๐ฎ๐ณIndia mrinalini9 New Delhi
Hi,
I have reviewed patch #12, it applied cleanly.
But has some trailing whitespace issues in the patch that need to be fixed:
drupal.org_files_issues_2023-10-10_3368542-12.patch:12: trailing whitespace. drupal.org_files_issues_2023-10-10_3368542-12.patch:16: trailing whitespace. drupal.org_files_issues_2023-10-10_3368542-12.patch:72: trailing whitespace. drupal.org_files_issues_2023-10-10_3368542-12.patch:103: trailing whitespace. drupal.org_files_issues_2023-10-10_3368542-12.patch:107: trailing whitespace. warning: squelched 5 whitespace errors warning: 10 lines add whitespace errors.
Also, there are still few phpcs errors left that need to be fixed:
FILE: /zurb_views/js/views-zurb.js ------------------------------------------------------------------------------------------------ FOUND 4 ERRORS AFFECTING 4 LINES ------------------------------------------------------------------------------------------------ 10 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found 17 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 3 empty lines 19 | ERROR | [ ] More than 2 empty lines are not allowed 20 | ERROR | [x] Expected 1 newline at end of file; 0 found ------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------
Please fix all of these things.
Thanks & Regards,
Mrinalini - Status changed to Needs review
10 months ago 12:20pm 5 February 2024 - Status changed to Needs work
10 months ago 11:42am 6 February 2024 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
Let's use the issue fork which has been already created.
- Assigned to pray_12
- Issue was unassigned.
- Status changed to Needs review
10 months ago 1:56pm 6 February 2024 Venkatraman Ganesan โ made their first commit to this issueโs fork.
- Status changed to RTBC
4 months ago 10:16am 10 July 2024 - ๐ต๐ญPhilippines cleavinjosh
Hi @Preethy_ray,
I applied MR!1, it was applied smoothly and fixed the phpcs issues.
โ zurb_views git:(1.0.x) curl https://git.drupalcode.org/project/zurb_views/-/merge_requests/1.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 8689 0 8689 0 0 19763 0 --:--:-- --:--:-- --:--:-- 19792 patching file README.md patching file src/Plugin/views/style/ViewsZurbAccordion.php patching file src/Plugin/views/style/ViewsZurbBlockGrid.php patching file src/ViewsZurb.php patching file templates/views-zurb-block-grid.html.twig patching file views_zurb.info.yml patching file views_zurb.module patching file views_zurb.theme.inc โ zurb_views git:(1.0.x) โ .. โ contrib git:(main) โ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml zurb_views โ contrib git:(main) โ
Thank you.
- Merge request !3Issue #3368542: Fix the warnings/errors reported by PHP_CodeSniffer โ (Open) created by apaderno