Parreview issues

Created on 8 January 2020, almost 5 years ago
Updated 9 August 2023, over 1 year ago

Hi,

I'm coming to your issue queue from your post on Linkedin :-). I looked at your code and spotted some issues right away so I ran a parreview and here is the result. I also noticed some gramatical and sentence errors, so you should ideally also look at all your sentences that you expose to the user.

Git errors:

It appears you are working in the "@branch" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.

Review of the @branch branch (commit 9eda5b5):

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.
The REQUIREMENTS section is missing.
The INSTALLATION section is missing.
The CONFIGURATION section is missing.

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: ...eviewsh/pareview_temp/src/Controller/FindExternalLinksController.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------
 19 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
 21 | WARNING | t() calls should be avoided in classes, use dependency
    |         | injection and $this->t() instead
 22 | WARNING | t() calls should be avoided in classes, use dependency
    |         | injection and $this->t() instead
 23 | WARNING | t() calls should be avoided in classes, use dependency
    |         | injection and $this->t() instead
 47 | WARNING | t() calls should be avoided in classes, use dependency
    |         | injection and $this->t() instead
--------------------------------------------------------------------------


FILE: ...endor/drupal/pareviewsh/pareview_temp/src/Form/ConfigurationForm.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------
  80 | WARNING | \Drupal calls should be avoided in classes, use
     |         | dependency injection instead
 122 | WARNING | t() calls should be avoided in classes, use dependency
     |         | injection and $this->t() instead
--------------------------------------------------------------------------


FILE: ...000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/batch.inc
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------
 51 | WARNING | Unused variable $site_url.
 52 | WARNING | Unused variable $parsed_base_url.
 54 | WARNING | Unused variable $url_path.
--------------------------------------------------------------------------

Time: 342ms; Memory: 4Mb

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.
This automated report was generated with PAReview.sh, your friendly project application review script.

FILE: ...b/vendor/drupal/pareviewsh/pareview_temp/find_external_links.install
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------
 13 | 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."
 21 | 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."
--------------------------------------------------------------------------


FILE: ...endor/drupal/pareviewsh/pareview_temp/src/Form/ConfigurationForm.php
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------
 82 | ERROR | [x] Object operator not indented correctly; expected 6
    |       |     spaces but found 10
 83 | ERROR | [x] Functions must not contain multiple empty lines in a
    |       |     row; found 2 empty lines
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 669ms; Memory: 4Mb

Most of the issues should be easy to fix, therefore I'm tagging it as Novice.

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇧🇪Belgium BramDriesen Belgium 🇧🇪

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024