Skip to content

PHPCS gets stuck creating file list when processing circular symlinks #1758

Closed
@reedy

Description

@reedy

This is fine on PHP_CodeSniffer 2.9.0, but on 3.1.1, running phpcs on this repo it gets stuck on Creating file list...

To reproduce:

git clone https://gerrit.wikimedia.org/r/operations/mediawiki-config
cd mediawiki-config
git fetch https://gerrit.wikimedia.org/r/operations/mediawiki-config refs/changes/65/367465/15 && git cherry-pick FETCH_HEAD
git submodule update --init --recursive
php composer.phar update
php multiversion/vendor/bin/phpcs -vvv .

Then it'll get to

Registered PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\SuperfluousWhitespaceSniff
Registered PHP_CodeSniffer\Standards\Zend\Sniffs\Files\ClosingTagSniff
Registered PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\BacktickOperatorSniff
Creating file list... 

In our CI, we get it timing out after 10 minutes

20:49:09   [Symfony\Component\Process\Exception\ProcessTimedOutException]     
20:49:09   The process "composer phpcs" exceeded the timeout of 600 seconds. 

Originally, we had some issues relating to symlinks, https://phabricator.wikimedia.org/T171510 which I think was "fixed" in #1438 (errors being the same "No PHP code was found in this file" etc) and therefore edcca45

Did that break something? The repo has quite a few symlinks...

Downstream task for this is https://phabricator.wikimedia.org/T181262

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions