I am not sure if this issue is with Drupal coding standard for PHP CodeSniffer defined in Coder module or this is PHP CodeSniffer issue. I am reporting it here.

If some code has complex regex defined then phpcs report incorrect indentation even if indentation is correct.

$ phpcs --standard=Drupal /home/vagrant/docroot/web/docroot/sites/all/modules/custom/components/itinerary_pane/itinerary_format_tour.inc

FILE: ...custom/components/itinerary_pane/itinerary_format_tour.inc
--------------------------------------------------------------------------------
FOUND 4 ERROR(S) AFFECTING 4 LINE(S)
--------------------------------------------------------------------------------
  90 | ERROR | Use XHTML style <br /> tags instead of <br>
  92 | ERROR | Use XHTML style <br /> tags instead of <br>
 169 | ERROR | Line indented incorrectly; expected 107 spaces, found 4
 170 | ERROR | Line indented incorrectly; expected 109 spaces, found 6
--------------------------------------------------------------------------------

See attached screenshot for line 169 and 170 where error is reported.

Issue fork coder-2898876

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

msankhala created an issue. See original summary.

anoopsingh92’s picture

Assigned: Unassigned » anoopsingh92
Issue tags: -

Hello,

I am checking this issue. I will update you soon.

Thanks

anoopsingh92’s picture

Hello,

I have fixed some codding standards in this patch please review.

Thanks

anoopsingh92’s picture

Assigned: anoopsingh92 » Unassigned
Status: Active » Needs review
klausi’s picture

Status: Needs review » Closed (outdated)

@anoopsingh92 Coder itself does not use Drupal's coding standard but the PHPCS core coding standard to be compatible with modified extended sniffs.

It also looks like your patch has nothing to do with the original reported problem?

@msankhala this issue is quite old, if the problem still exists for you on the most recent Coder version please open a new issue. Thanks!