Problem/Motivation
Getting following error/warnings:
FILE: D:\xampp\htdocs\project_10\web\modules\contrib\sdc_styleguide\README.md
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
29 | ERROR | [x] Expected 1 newline at end of file; 2 found
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------
FILE: D:\xampp\htdocs\project_10\web\modules\contrib\sdc_styleguide\sdc_styleguide.module
-----------------------------------------------------------------------------------------
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
-----------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\project_10\web\modules\contrib\sdc_styleguide\src\Form\SDCExplorerForm.php
------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
22 | ERROR | [x] Missing function doc comment
124 | ERROR | [x] Concat operator must be surrounded by a single space
147 | ERROR | [x] Missing function doc comment
151 | ERROR | [x] Missing function doc comment
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------
Steps to reproduce
Run following command:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml sdc_styleguide/
Proposed resolution
Above error/warnings need to be fixed.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3376055-2.patch | 1.62 KB | arti_parmar |
Issue fork sdc_styleguide-3376055
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
Comment #2
arti_parmar commentedKindly review patch.
Comment #4
alemadleiThere have been multiple changes and the original code no longers works. As preparation for opting in the security advisory, I've addressed these and a bunch others sniffs.
These are all fixed in the dev branches.
Comment #5
alemadlei