Repository navigation
Blink: port all 89 report-only PHP_CodeSniffer sniffs - #411
Merged
Merged
Conversation
…peSniff and Metrics
…menting, Classes, ControlStructures, Strings)
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.
Blink now covers every PHP_CodeSniffer sniff, not only the fixable ones: 203 of 203.
Measurement
cmd/list-universe/phpcs_sniffs.txt, regenerated bybin/phpcs-sniffs.sh, wasphpcs-fixable-sniffs.sh), so a missing report-only sniff fails CI like a missing fixerbin/phpcs-fixtures.shalso stores the errors ECS reports on each upstream test file as<input>.errors(line<TAB>source<TAB>message)TestPhpcsUpstreamErrors: every blink rule implementingErrorReportermust report exactly those rows - same line, code and messagePorted (89)
Shared ports of the PHPCS base classes:
abstract_scope.go(AbstractScopeSniff),abstract_variable.go(AbstractVariableSniff),abstract_pattern.go(AbstractPatternSniff).Behaviour notes
SniffFileProcessor::ESCALATE_WARNINGS_SNIFF, so warning-only sniffs (e.g. DuplicateClassName, JumbledIncrementer, NonExecutableCode, SideEffects, ConstantVisibility, GlobalFunction) report nothing in blink eitherSwitchNotIndented), PSR2 FunctionCallSignature (PEAR port with PSR2's multi-line test), Deprecated/DiscouragedFunctions (ForbiddenFunctions)php -lfrom PATH like the sniff; without php it reports nothing and its fixtures are skipped (Windows CI)php_deprecated_functions.txt, viabin/php-builtin-functions.sh); upstream reads the running PHPbin/ecsvsbin/ecs --blinkon extra edge-case files; identical errors*.php, so Squiz FileExtension's.incerror shows in ECS but not with--blink