Created on 22 August 2023, over 1 year ago

Problem/Motivation

Pareview output:

  • Your README.txt does not follow best practices (headings need to be uppercase). See https://www.drupal.org/node/2181737 .
    • The INTRODUCTION section is missing.
  • Remove LICENSE.txt, it will be added by drupal.org packaging automatically.
  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards ). See attachment.
  • DrupalPractice has found some issues with your code, but could be false positives.
    
    FILE: shortcutperrole.module
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     13 | WARNING | Global constants should not be used, move it to a class
        |         | or interface
    --------------------------------------------------------------------------
    
    
    FILE: src/Form/ShortcutPerRoleSettingsForm.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     34 | WARNING | ShortcutSet::loadMultiple calls should be avoided in
        |         | classes, use dependency injection instead
    --------------------------------------------------------------------------
    
    Time: 50ms; Memory: 6MB
    
  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests ? This is not a requirement but encouraged for professional software development.


FILE: shortcutperrole.module
--------------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------
 13 | WARNING | [ ] All constants defined by a module must be prefixed
    |         |     with the module's name, expected
    |         |     "SHORTCUTPERROLE_'SHORTCUT_PER_ROLE_DEFAULT_SET'" but
    |         |     found "'SHORTCUT_PER_ROLE_DEFAULT_SET'"
 32 | WARNING | [ ] Format should be "* Implements hook_foo().", "*
    |         |     Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "*
    |         |     Implements hook_foo_BAR_ID_bar() for
    |         |     xyz-bar.html.twig.", "* Implements
    |         |     hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "*
    |         |     Implements hook_foo_BAR_ID_bar() for block
    |         |     templates."
 35 | ERROR   | [x] No space found before comment text; expected "//
    |         |     determine the highest rid of user & assign the
    |         |     shortcut set." but found "//determine the highest rid
    |         |     of user & assign the shortcut set."
 35 | ERROR   | [x] Inline comments must start with a capital letter
 44 | ERROR   | [x] Use null coalesce operator instead of ternary
    |         |     operator.
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: src/Form/ShortcutPerRoleSettingsForm.php
--------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------
 36 | ERROR | [x] Short array syntax must be used to define arrays
 44 | ERROR | [x] Expected 1 space before "="; 0 found
 45 | ERROR | [x] Space found before square bracket; expected "][" but
    |       |     found "] ["
 45 | ERROR | [x] Space found before square bracket; expected "$rid]" but
    |       |     found "$rid ]"
 45 | ERROR | [x] Short array syntax must be used to define arrays
 47 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 48 | ERROR | [x] Expected 1 space after "=>"; 2 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 122ms; Memory: 8MB
📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇪🇨Ecuador jwilson3

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jwilson3
  • @jwilson3 opened merge request.
  • 🇪🇨Ecuador jwilson3

    This is mostly fixed now...

    $ ../pareviewsh/pareview.sh .<code>
    <ul>
    <li>Your README.md does not follow best practices (headings need to be uppercase). See https://www.drupal.org/node/2181737 .
    <ul>
    <li>The INTRODUCTION section is missing.</li>
    <li>The REQUIREMENTS section is missing.</li>
    <li>The INSTALLATION section is missing.</li>
    <li>The CONFIGURATION section is missing.</li>
    </ul></li>
    <li>No automated test cases were found, did you consider writing <a href="https://www.drupal.org/simpletest">Simpletests</a> or <a href="https://www.drupal.org/phpunit">PHPUnit tests</a>? This is not a requirement but encouraged for professional software development.</li>
    </ul>
    <i>This automated report was generated with <a href="https://www.drupal.org/project/pareviewsh">PAReview.sh</a>, your friendly project application review script.</i>
    
  • Status changed to Fixed over 1 year ago
  • 🇪🇨Ecuador jwilson3

    Included in release 2.0.1

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024