zendframework / zend-coding-standard

Zend Framework Coding Standard
BSD 3-Clause "New" or "Revised" License
35 stars 8 forks source link

[2.0.0-alpha.3] Failed to fix: Reached maximum number of loops #14

Open Xerkus opened 5 years ago

Xerkus commented 5 years ago

This file causes maximum number of loops reached error with 2.0.0-alpha.3: https://github.com/zendframework/zend-mvc/blob/d83d57e2e64e240e94efcc43d5b1483919cb65a0/src/View/Http/InjectTemplateListener.php

Related dependencies:

dealerdirect/phpcodesniffer-composer-installer v0.5.0
slevomat/coding-standard                       4.8.7
squizlabs/php_codesniffer                      3.4.0
webimpress/coding-standard                     dev-master dffb652
zendframework/zend-coding-standard             2.0.0-alpha.3

Offending part by the looks of it: https://github.com/zendframework/zend-mvc/blob/d83d57e2e64e240e94efcc43d5b1483919cb65a0/src/View/Http/InjectTemplateListener.php#L108-L115

            if (// Allow disabling rule by setting value to false since config
                // merging have no feature to remove entries
                false == $replacement
                // Match full class or full namespace
                || ! ($controller === $namespace || strpos($controller, $namespace . '\\') === 0)
            ) {
                continue;
            }
 => Fixing file: 0/38 violations remaining [made 45 passes]...   * fixed 0 violations, starting loop 46 *
WebimpressCodingStandard\Sniffs\Commenting\PlacementSniff (line 41) replaced token 838 (T_COMMENT) "//·Allow·disabling·rule·by·setting·value·to·false·since·config\n" => "·//·Allow·disabling·rule·by·setting·value·to·false·since·config\n"
=> Fixing file: 1/38 violations remaining [made 46 passes]...   * fixed 1 violations, starting loop 47 *
**** PHP_CodeSniffer\Standards\PSR2\Sniffs\ControlStructures\ControlStructureSpacingSniff (line 105) has possible conflict with another sniff on loop 45; caused by the following change ****
**** replaced token 838 (T_WHITESPACE) "·//·Allow·disabling·rule·by·setting·value·to·false·since·config\n" => "//·Allow·disabling·rule·by·setting·value·to·false·since·config\n" ****
**** ignoring all changes until next loop ****
=> Fixing file: 0/38 violations remaining [made 47 passes]...   * fixed 0 violations, starting loop 48 *
PHP_CodeSniffer\Standards\PSR2\Sniffs\ControlStructures\ControlStructureSpacingSniff (line 105) replaced token 838 (T_WHITESPACE) "·//·Allow·disabling·rule·by·setting·value·to·false·since·config\n" => "//·Allow·disabling·rule·by·setting·value·to·false·since·config\n"
=> Fixing file: 1/38 violations remaining [made 48 passes]...   * fixed 1 violations, starting loop 49 *
**** WebimpressCodingStandard\Sniffs\Commenting\PlacementSniff (line 41) has possible conflict with another sniff on loop 47; caused by the following change ****
**** replaced token 838 (T_COMMENT) "//·Allow·disabling·rule·by·setting·value·to·false·since·config\n" => "·//·Allow·disabling·rule·by·setting·value·to·false·since·config\n" ****
**** ignoring all changes until next loop ****
weierophinney commented 4 years ago

This repository has been closed and moved to laminas/laminas-coding-standard; a new issue has been opened at https://github.com/laminas/laminas-coding-standard/issues/8.