First round of changes needed for PHPCS-2 migration#101
First round of changes needed for PHPCS-2 migration#101photodude wants to merge 1 commit intojoomla:phpcs-2from
Conversation
There was a problem hiding this comment.
If you don't actually provide any fixing code, then reporting error/warning as fixable would fail coding standard tests. You don't have any tests in the standard and that's why you don't see the difference.
Nobody really removed addError or addWarning methods. And there can be situations, when error can't be fixed at all where they can be used.
|
I think, that file removal in favor of build-in sniffs mentioned in |
|
I would agree only PR #102 associated with issue #104 is specific to the current master branch compatible with the PHPCS-1.5x version
For removals related to code standards with the PHPCS-1.5.x compatible master branch see PR #102 |
|
Reference issue #53 |
|
Merge conflict here. Probably you need to rebase and squash. |
Increased notional limit to 150 chars. Reorder to better match the Squiz/ruleset.xml This improves readability when migrating versions Also increased the max line the comment to 150 chars long since it was that way in the code Match Squiz standard CastSpacingSniff.php - Since we are not making any specific changes here, this file should likely be eliminated and just include the Squiz standard add Squiz.WhiteSpace.CastSpacingSniff rule so duplication can be eliminated. This file is identical to the Squiz standard CastSpacingSniff.php - added rule to the ruleset and delete the unnecessary file rebuild from source with modifications - add T_FUNCTION, and T_CLASS, to array of tokens - remove parenthesis_opener checks (as was done previously) - add T_COMMENT and T_WHILE to the $tokens[$trailingContent] checks (as was done previously) nothing special here, replace with generic rule add Generic.WhiteSpace.DisallowSpaceIndentSniff rule This is now a Joomla class sniff nothing special here, replace with generic rule - add Generic.PHP.LowerCaseConstantSniff rule nothing special here, replace with Squiz rule nothing special here, replace with Squiz rule nothing special here, replace with PEAR rule Update rules to use source standards to eliminate unnecessary duplication add comment about the removed section "parenthesis_opener" - by adding a comment about what was intentionally removed we will help the coding standard be able to make changes quicker when the source standard changes or has bug fixes applied. T_DOC_COMMENT token has also been removed The T_DOC_COMMENT token has also been removed, replaced instead by T_DOC_COMMENT_OPEN_TAG T_DOC_COMMENT token has also been removed The T_DOC_COMMENT token has also been removed, replaced instead by T_DOC_COMMENT_OPEN_TAG T_DOC_COMMENT token has been removed The T_DOC_COMMENT token has been removed, replaced instead by T_DOC_COMMENT_OPEN_TAG T_DOC_COMMENT token has been removed The T_DOC_COMMENT token has been removed, replaced instead by T_DOC_COMMENT_OPEN_TAG T_DOC_COMMENT token has been removed The T_DOC_COMMENT token has been removed, replaced instead by T_DOC_COMMENT_OPEN_TAG Add PSR2.ControlStructures.ElseIfDeclaration rule Replace with PSR2.ControlStructures.ElseIfDeclaration rule Sniff is not part of the rule names copy PR joomla#106 Better documentation of differences from core standards
|
close and reopen with rebase and squashed commits as PR #109 |
This PR includes the first round of code changes to provide support for PHPCS version 2.x