From:  gsherwood@squiz.net
Date:  12 Jan 2015 11:35:48 Hong Kong Time
Newsgroup:  news.php.net/php.pear.bugs
Subject:  

[PEAR-BUG] Bug #20482 [Ver]: Scope indent sniff can get into infinite loop due wen processing parse error

NNTP-Posting-Host:  null

Edit report at https://pear.php.net/bugs/bug.php?id=20482&edit=1

 ID:               20482
 Updated by:       gsherwood@squiz.net
 Reported By:      susah dot yak at gmail dot com
-Summary:          PHP_CodeSniffer Won't Analyze and High CPU Usage
+Summary:          Scope indent sniff can get into infinite loop due wen
                    processing parse error
 Status:           Verified
 Type:             Bug
 Package:          PHP_CodeSniffer
 Operating System: Windows 8.1
 Package Version:  2.1.0
 PHP Version:      5.6.4
 Assigned To:      squiz
 Roadmap Versions: 
 New Comment:

-Summary: PHP_CodeSniffer Won't Analyze and High CPU Usage
+Summary: Scope indent sniff can get into infinite loop due wen
          processing parse error



Previous Comments:
------------------------------------------------------------------------

[2015-01-12 03:22:42] squiz

-Status:      Open
+Status:      Verified
-Assigned To:
+Assigned To: squiz
The Generic.WhiteSpace.ScopeIndent sniff seems to be getting caught out
by that parse 
errors. I'll take a look into it now.

------------------------------------------------------------------------

[2015-01-11 20:35:26] sourc7

Description:
------------
Hi, I'm upgrading PHP_CodeSniffer from 1.5.6 to 2.1.0 (latest) but when
I analyze php file containing echo "". It's not output the result but
just waiting with high cpu usage.

But after I removing the PHP_CodeSniffer 2.10 then Re-installing the
1.5.6 the problem is solved

Test script:
---------------