Repository navigation
Blink: port 12 more PHP_CodeSniffer sniffs - #404
Merged
Merged
Conversation
…oubleQuoteUsage sniffs
… ObjectOperatorSpacing and SpreadOperatorSpacingAfter sniffs
… DocCommentAlignment sniffs
…ated by the rebase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fourth wave of PHP_CodeSniffer ports. Every sniff passes PHP_CodeSniffer's own test files byte-exact against ECS output (
TestPhpcsUpstreamFixtures), and extra edge cases were run throughbin/ecsvsbin/ecs --blinkwith identical output.New sniffs
Generic.PHP.RequireStrictTypes,Generic.Strings.UnnecessaryHeredoc- deliberate no-ops: their only fixes areaddFixableWarning, which ECS dropsGeneric.Files.LineEndings(configurableeolChar),Squiz.Strings.DoubleQuoteUsagePSR12.Functions.ReturnTypeDeclaration(Go typeReturnTypeDeclarationSniff),PSR12.Operators.OperatorSpacing,Squiz.WhiteSpace.ObjectOperatorSpacing,Generic.WhiteSpace.SpreadOperatorSpacingAfterSquiz.Commenting.PostStatementComment,Squiz.Commenting.ClosingDeclarationComment,Squiz.Commenting.DocCommentAlignmentPSR12.Classes.ClassInstantiationShared helpers
phpcs_operator.go: PHPCS operator classification, union/intersection/DNF type detection andFile::isReference(simplified) - ready forSquiz.WhiteSpace.OperatorSpacingisPhpcsAnnotationComment: PHPCS tokenizesphpcs:*comments specially even with annotations off, comment sniffs skip themNot ported, still listed
Squiz.WhiteSpace.ScopeClosingBrace- needs PHPCS's full scope map (case/defaultsharing closers, alternative syntax), better done once as shared infrastructure for ScopeIndent and ControlSignature tooSquiz.WhiteSpace.OperatorSpacing- spacing rules not ported yetNotes
ClosingDeclarationCommentreplaces the rest of the line after}like ECS does (} foo();->}//end x()), soTestOperatorLinebreakKeepsNullFirstParenAssignment(runs all rules) now expects the//endcommentPHP_CodeSniffer coverage: 54 -> 66 of 114,
phpcs-not-ported.txt60 -> 48.