Problem/Motivation

Getting Following errors/warnings

$ phpcs --standard=Drupal tencentcloud_captcha

FILE: C:\Users\Admin\Desktop\task\tencentcloud_captcha\js\actions.js
--------------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 8 LINES
--------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found
    |       |     "\r\n"
  4 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
    |       |     found "false"
 23 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
 25 | ERROR | [x] Space found before semicolon; expected "return;" but found
    |       |     "return ;"
 33 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
    |       |     found "true"
 36 | ERROR | [x] Functions must not contain multiple empty lines in a row;
    |       |     found 2 empty lines
 55 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
    |       |     found "false"
 57 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
    |       |     found "false"
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: C:\Users\Admin\Desktop\task\tencentcloud_captcha\js\prepare.js
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found
    |       |     "\r\n"
  9 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
    |       |     found "false"
 11 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: C:\Users\Admin\Desktop\task\tencentcloud_captcha\src\Form\SettingsForm.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found
   |       |     "\r\n"
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 439ms; Memory: 8MB

Proposed resolution

Fix the errors and warnings.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Jay Jangid created an issue. See original summary.

jay jangid’s picture

Assigned: jay jangid » Unassigned
Status: Active » Needs review

Created MR , please review.

Thank you.

hardikpandya’s picture

Assigned: Unassigned » hardikpandya
hardikpandya’s picture

Assigned: hardikpandya » Unassigned

I found phpcs issues for info.yml file and DI issues reported for the form. I have fixed them and committed the changes.

  • Lugir committed 733d0c74 on 2.0.x
    Issue #3338467 by Jay Jangid, hardikpandya: Drupal Coding Standards...
lugir’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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