{"action":"created","issue":{"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/618","labels_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/618/labels{/name}","comments_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/618/comments","events_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/618/events","html_url":"https://github.com/squizlabs/PHP_CodeSniffer/issues/618","id":85969421,"number":618,"title":"phpcs opens php process with 100% CPU usage ","user":{"login":"kokokurak","id":8510621,"avatar_url":"https://avatars.githubusercontent.com/u/8510621?v=3","gravatar_id":"","url":"https://api.github.com/users/kokokurak","html_url":"https://github.com/kokokurak","followers_url":"https://api.github.com/users/kokokurak/followers","following_url":"https://api.github.com/users/kokokurak/following{/other_user}","gists_url":"https://api.github.com/users/kokokurak/gists{/gist_id}","starred_url":"https://api.github.com/users/kokokurak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kokokurak/subscriptions","organizations_url":"https://api.github.com/users/kokokurak/orgs","repos_url":"https://api.github.com/users/kokokurak/repos","events_url":"https://api.github.com/users/kokokurak/events{/privacy}","received_events_url":"https://api.github.com/users/kokokurak/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-08T00:30:38Z","updated_at":"2015-06-08T07:43:06Z","closed_at":"2015-06-08T07:43:06Z","body":"As mentioned here: https://github.com/SublimeLinter/SublimeLinter-php/issues/12\r\n\r\nSometimes, phpcs command opens php process that uses 100% CPU. We found out that it occurs when you test following code:\r\n```php\r\n<?php\r\nforeach\r\n```\r\nI haven't found any other cases so far.\r\n\r\nIt's a huge problem when I use real-time sniffing, it always opens such process when I just open new `foreach` loop and my fan begins to dance."},"comment":{"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/comments/109893955","html_url":"https://github.com/squizlabs/PHP_CodeSniffer/issues/618#issuecomment-109893955","issue_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/618","id":109893955,"user":{"login":"gsherwood","id":185976,"avatar_url":"https://avatars.githubusercontent.com/u/185976?v=3","gravatar_id":"","url":"https://api.github.com/users/gsherwood","html_url":"https://github.com/gsherwood","followers_url":"https://api.github.com/users/gsherwood/followers","following_url":"https://api.github.com/users/gsherwood/following{/other_user}","gists_url":"https://api.github.com/users/gsherwood/gists{/gist_id}","starred_url":"https://api.github.com/users/gsherwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsherwood/subscriptions","organizations_url":"https://api.github.com/users/gsherwood/orgs","repos_url":"https://api.github.com/users/gsherwood/repos","events_url":"https://api.github.com/users/gsherwood/events{/privacy}","received_events_url":"https://api.github.com/users/gsherwood/received_events","type":"User","site_admin":false},"created_at":"2015-06-08T07:43:06Z","updated_at":"2015-06-08T07:43:06Z","body":"This is fixed in the current master version and will be released in the next version. The original issue is this one: https://github.com/squizlabs/PHP_CodeSniffer/issues/580\r\n\r\nIdeally, PHPCS wouldn't be called on files that contain syntax errors, but I've added a bunch more guard code to make sure PHPCS doesnt break if it does encounter files like this.\r\n\r\nPlease have a go of the master version if you can."}}