Reproducible steps:

1. Clone master branch of PCA module:

git clone https://github.com/mycognitive/postcodeanywhere

2. Run phpcbf to fix the code:

cd postcodeanywhere
  phpcbf --standard=Drupal --extensions=php,module,inc,install,test,profile,theme .
  

Then most of the class.inc files fails with 50 passes without going forward:

Changing into directory postcodeanywhere/classes
Processing CapturePlus_Interactive_Find.class.inc [PHP => 680 tokens in 107 lines]... DONE in 189ms (114 fixable violations)
=> Fixing file: 1/114 violations remaining [made 50 passes]... ERROR in 10.24 secs
Processing CapturePlus_Interactive_Retrieve.class.inc [PHP => 798 tokens in 119 lines]... DONE in 372ms (246 fixable violations)
=> Fixing file: 1/246 violations remaining [made 50 passes]... ERROR in 19.66 secs
Processing PostcodeAnywhere_Interactive_Find.class.inc [PHP => 540 tokens in 98 lines]... DONE in 164ms (89 fixable violations)
=> Fixing file: 1/89 violations remaining [made 50 passes]... ERROR in 8.65 secs
Processing PostcodeAnywhere_Interactive_FindByAreaId.class.inc [PHP => 451 tokens in 88 lines]... DONE in 130ms (75 fixable violations)
=> Fixing file: 1/75 violations remaining [made 50 passes]... ERROR in 7.57 secs

Comments

kenorb created an issue. See original summary.

kenorb’s picture

Issue summary: View changes
klausi’s picture

Thanks for reporting, I can reproduce the problem.

Can you extract a minimum example of your code where this happens and add that to the issue summary?

  • klausi committed 0b8863c on 8.x-2.x
    Issue #2605972: Fixed comment short description capitalizing fixer
    
klausi’s picture

Title: ERROR with too many passes (50) » Comment short description fixer triggers endless loop
Status: Active » Fixed

Found the problem: the comment short description fixer is not always able to capitalize comments.

Status: Fixed » Closed (fixed)

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