-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup PHP Codesniffer warnings and enable fail #26516
Merged
Merged
Conversation
This file contains 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
Size Change: 0 B Total Size: 1.37 MB ℹ️ View Unchanged
|
mkaz
force-pushed
the
fix/26490-warnings
branch
from
October 28, 2020 16:10
74146b1
to
08aac8e
Compare
mkaz
force-pushed
the
fix/26490-warnings
branch
2 times, most recently
from
December 7, 2020 16:54
f4b2cc7
to
93b80d7
Compare
mkaz
force-pushed
the
fix/26490-warnings
branch
from
February 11, 2021 21:33
93b80d7
to
d0f2d74
Compare
- Removes flag ignore warnings in composer.json - Fixes Unused variable warnings Most cases were: `foreach ( $some_array as $key => $value )` with the $key value not being used. If ommited the foreach will just set the value and ignore the key.
mkaz
changed the title
Cleanup and enable unused variable warning
Cleanup PHP Codesniffer warnings and enable fail
Jun 18, 2021
gziolo
added
the
Gutenberg Plugin
Issues or PRs related to Gutenberg Plugin management related efforts
label
Jun 19, 2021
aristath
approved these changes
Jun 19, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Gutenberg Plugin
Issues or PRs related to Gutenberg Plugin management related efforts
[Type] Code Quality
Issues or PRs that relate to code quality
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.
Description
In #26472 a flag was added to the lint command to not fail on warnings, it was failing on instances of Unused Variables.
This PR fixes the unused variables in the code and removes flag
Closes #26490
How has this been tested?
Setup:
composer install
Baseline:
npm run lint-php
, confirm warningsConfirm:
npm run lint-php
If you are not running Docker, you can call:
./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=phpcs.xml.dist
Types of changes