Fix Drupal Coding Standard Errors

Created on 20 February 2021, about 4 years ago
Updated 2 March 2024, about 1 year ago

Problem/Motivation

$ phpcs --standard=Drupal .

FILE: /insert_view_adv/modules/bueditor/src/Plugin/BUEditorPlugin/DrupalViews.php
---------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------
 32 | ERROR | Public method name "DrupalViews::alterEditorJS" is not in lowerCamel format
---------------------------------------------------------------------------------------------------------------------------------


FILE: /insert_view_adv/modules/bueditor/js/bueditor.drupalviews.js
-----------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 10 LINES
-----------------------------------------------------------------------------------------------------------------------
  14 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
  26 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
  39 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
  59 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
  73 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
  82 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
  84 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
 103 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
 105 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
 149 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
-----------------------------------------------------------------------------------------------------------------------


FILE: /insert_view_adv/js/redirect.js
-------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------
 1 | ERROR | [x] Missing file doc comment
-------------------------------------------------------------------------------------


FILE: /insert_view_adv/js/plugin/plugin.js
-----------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
-----------------------------------------------------------------------------------------------------------------------
   2 | ERROR | [x] The second line in the file doc comment must be "@file"
   4 | ERROR | [x] Doc comment short description must end with a full stop
   4 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
   5 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
   6 | ERROR | [ ] Wrong function doc comment end; expected "*/", found "**/"
 206 | ERROR | [x] Doc comment short description must end with a full stop
-----------------------------------------------------------------------------------------------------------------------


FILE: /insert_view_adv/js/plugin/_plugin.js
-------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------
 101 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
 106 | ERROR | [x] Expected 1 space before "+"; 2 found
 214 | ERROR | [x] Expected 1 space before "+"; 0 found
 214 | ERROR | [x] Expected 1 space after "+"; 0 found
-------------------------------------------------------------------------------------------

Proposed resolution

Fix the errors as per Drupal coding standards.

Errors in the file /insert_view_adv/js/plugin/plugin.js can be ignored as it's mentioned in the file "DO NOT EDIT THIS FILE".

User interface changes

NONE

API changes

NONE

Data model changes

NONE

📌 Task
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇮🇳India ankithashetty Karnataka, India

Live updates comments and jobs are added and updated live.
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