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

FILE: C:\xampp\htdocs\contribution\web\themes\contrib\ui_suite_protocol\ui_suite_protocol.theme
-----------------------------------------------------------------------------------------------
FOUND 50 ERRORS AFFECTING 23 LINES
-----------------------------------------------------------------------------------------------
21 | ERROR | [x] Expected 1 space after "="; 2 found
26 | ERROR | [x] Expected 1 space after "="; 2 found
40 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
40 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
43 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
43 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
44 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
44 | ERROR | [x] Line indented incorrectly; expected at least 6 spaces, found 4
44 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
45 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
45 | ERROR | [x] Line indented incorrectly; expected at least 6 spaces, found 4
45 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
46 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
46 | ERROR | [x] Line indented incorrectly; expected at least 6 spaces, found 4
46 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
47 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
48 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
48 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
50 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
50 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
50 | ERROR | [x] Closing brace indented incorrectly; expected 2 spaces, found 1
53 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
53 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
54 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
54 | ERROR | [x] Line indented incorrectly; expected at least 6 spaces, found 4
54 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
55 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
55 | ERROR | [x] Line indented incorrectly; expected at least 6 spaces, found 4
55 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
56 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
56 | ERROR | [x] Line indented incorrectly; expected at least 6 spaces, found 4
56 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
57 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
58 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
58 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
60 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
60 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
60 | ERROR | [x] Closing brace indented incorrectly; expected 2 spaces, found 1
61 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
61 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
91 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
91 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 7
104 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
104 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 7
118 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
118 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 7
137 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
137 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 7
150 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
150 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 9
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 50 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------

Time: 404ms; Memory: 10MB

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

Rakhi Soni created an issue. See original summary.

rakhi soni’s picture

Assigned: rakhi soni » Unassigned
Status: Active » Needs review
StatusFileSize
new4.06 KB

I have created a patch to fix the Drupal Coding Standard Issue,, please review.

mrinalini9’s picture

Hi,

I have reviewed patch #2, looks good to me. It applied cleanly and fixed all errors as mentioned above in the issue description.

Thanks & Regards,
Mrinalini

anoopsingh92 made their first commit to this issue’s fork.

anoopsingh92’s picture

Assigned: Unassigned » anoopsingh92
StatusFileSize
new52.01 KB

Hi @mrinalini9, I don't know how you are applying this patch. You didn't share any screenshot of the patch applying.
@rakhi your patch is not working for me. I am getting these errors.

Lenovo@LAPTOP-PDE747K8 MINGW64 /c/xampp/htdocs/drupal-9/web/modules/contrib/ui_suite_protocol-3292587 (3292587-drupal-coding-standard)
$ git apply -v drupal_coding_standard_issue-3292587-2.patch
Checking patch ui_suite_protocol.theme...
error: while searching for:
 * Add theme base path to images.
 */
function _ui_suite_protocol_add_image_path($item): array {
        $base_path = drupal_get_path('theme', 'ui_suite_protocol');
  if (is_array($item) && array_key_exists('#theme', $item)) {
    if ($item['#theme'] === 'image') {
                        $uri = isset($item['#uri']) ? implode('/', [
                                '',
                                $base_path,
                                $item['#uri'],
                        ]) : '';
                        $item['#uri'] = $uri;
    }
        }
  if (is_array($item) && array_key_exists('#type', $item)) {
    if (($item['#type'] === 'html_tag') && ($item['#tag'] === 'img')) {
                        $uri = isset($item['#attributes']['src']) ? implode('/', [
                                '',
                                $base_path,
                                $item['#attributes']['src'],
                        ]) : '';
                        $item['#attributes']['src'] = $uri;
    }
        }
        return $item;
}

/**

error: patch failed: ui_suite_protocol.theme:37
error: ui_suite_protocol.theme: patch does not apply

Please review carefully. I am moving it to Need work. Thanks

anoopsingh92’s picture

Assigned: anoopsingh92 » Unassigned
Status: Needs review » Needs work
himanshu_jhaloya’s picture

Assigned: Unassigned » himanshu_jhaloya

Hi,
I will work on this issue

himanshu_jhaloya’s picture

Assigned: himanshu_jhaloya » Unassigned
Status: Needs work » Needs review
StatusFileSize
new5.7 KB

Hi,
I worked on this issue please review this patch.

atul_ghate’s picture

Assigned: Unassigned » atul_ghate

Hi,
i will review this patch.

atul_ghate’s picture

Assigned: atul_ghate » Unassigned
Status: Needs review » Reviewed & tested by the community

#8 The patch was applied cleanly, LGTM moving to RTBC.

grimreaper’s picture

Assigned: Unassigned » grimreaper

Hi,

Patch does not apply anymore due to commit on the dev branch.

As there is no proper MR created, impossible to rebase.

I will recreate locally.

grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Reviewed & tested by the community » Fixed

  • Grimreaper committed ebcbea4 on 1.0.x
    Issue #3292587 by anoopsingh92, Rakhi Soni, himanshu_jhaloya, atul ghate...

Status: Fixed » Closed (fixed)

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