fix the issue reported by phpcs

Created on 24 July 2023, over 1 year ago
Updated 31 August 2023, over 1 year ago

Problem/Motivation

Getting following error/warnings:

FILE: D:\xampp\htdocs\project_10\web\themes\contrib\nature_trail\css\style.css
------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------
 165 | ERROR | Style definitions must end with a semicolon
------------------------------------------------------------------------------


FILE: D:\xampp\htdocs\project_10\web\themes\contrib\nature_trail\nature_trail.theme
--------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------------------------
  3 | ERROR   | Missing short description in doc comment
 49 | ERROR   | Doc comment short description must be on a single line, further text should be a separate paragraph
 64 | WARNING | Line exceeds 80 characters; contains 97 characters
--------------------------------------------------------------------------------------------------------------------


FILE: D:\xampp\htdocs\project_10\web\themes\contrib\nature_trail\theme-settings.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
  44 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
  44 | ERROR   | Concatenating translatable strings is not allowed, use placeholders instead and only one string literal
  50 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
  50 | ERROR   | Concatenating translatable strings is not allowed, use placeholders instead and only one string literal
  57 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
  57 | ERROR   | Concatenating translatable strings is not allowed, use placeholders instead and only one string literal
  62 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
  62 | ERROR   | Concatenating translatable strings is not allowed, use placeholders instead and only one string literal
  67 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
  67 | ERROR   | Concatenating translatable strings is not allowed, use placeholders instead and only one string literal
  72 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
  72 | ERROR   | Concatenating translatable strings is not allowed, use placeholders instead and only one string literal
 124 | WARNING | Do not use the check_markup() sanitization function on Form API #default_value elements, they get escaped automatically
-----------------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Run following command:

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml nature_trail/

Proposed resolution

Above error/warnings need to be fixed

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India arti_parmar

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

Comments & Activities

  • Issue created by @arti_parmar
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India arti_parmar

    Kindly review patch.

  • Status changed to Needs work over 1 year ago
  • 🇮🇳India djsagar

    @arti_parmar patch failed to apply getting error,

    please refer the screen short.

  • Status changed to Needs review over 1 year ago
  • 🇮🇳India mrinalini9 New Delhi

    Rerolled patch #2, please review it.

    Thanks!

  • 🇮🇳India sonam_sharma

    I have tested patch #4
    it is not applied properly

  • First commit to issue fork.
  • Status changed to Needs work over 1 year ago
  • 🇮🇳India djsagar

    @mrinalini9 failed to apply getting error,

    please refer the screen short.

  • Status changed to Needs review over 1 year ago
  • 🇮🇳India djsagar

    Created patch to fix the issue reported by phpcs.

    Please review.

  • 🇮🇳India Shreya_98

    I have Fixed all the issues reported by phpcs . Kindly review the patch file along with attached image .

  • Hello @Shreya_th,

    The issue has been marked as "Needs Review,"

    so the next steps involve carefully reviewing and testing the provided changes.

    If the patch fail during testing, please update the issue status from "Needs Review" to "Needs Work." After this, you can assign the task to yourself. Either upload the patch or create a merge request (MR) to address any errors that the previous patch might not have resolved.
    Additionally, it would be helpful if you could provide an interdiff file. This file allows other developers to easily compare your changes with the previous patch.

    To ensure adherence to Drupal's issue etiquette, please refer to the guidelines provided in the Drupal issue etiquette documentation .

    Thank you.

  • 🇮🇳India Shreya_98

    @thakurnishant_06 i have created interdiff file of my patch i.e. #9 and previous patch #8 .Kindly review it.

  • Status changed to RTBC over 1 year ago
  • Tested the patch #9. It fixes the remaining error and warnings .
    Moving it to RTBC.

Production build 0.71.5 2024