-
Notifications
You must be signed in to change notification settings - Fork 41
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
WPCS 3.0: Fix ruleset tests #736
Closed
Closed
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
cd7e371
Composer: up the minimum PHPCS version to 3.7.1
GaryJones a3acf35
Composer: rename scripts
GaryJones b4aa628
Composer: add script descriptions
GaryJones 8fb8805
Composer: use develop branch of WPCS
GaryJones 5a82c31
Composer: Normalize the order
GaryJones 2b893ca
CS: Use pre-increment over post-increment
GaryJones 0b84ea8
CS: Avoid reserved keyword for function param name
GaryJones b838219
CS: Update WordPress-Extra exclusions
GaryJones 1f6db81
Sniff::strip_quotes(): use PHPCSUtils version
GaryJones 9e6b16e
Sniff::find_array_open_close(): PHPCSUtils version
GaryJones 90a4658
Sniff::get_function_call_parameter(): PHPCSUtils
GaryJones e948dcb
Add Sniff::merge_custom_array()
GaryJones 2bb34af
Use PHPCSUtils MessageHelper::addMessage
GaryJones 03e7924
CS: fix coding standards for merge_custom_array()
GaryJones 80ca8ab
Composer: Add PHPCSUtils as required dependency
GaryJones 5408a46
CI: Refresh unit tests workflow
GaryJones 8e8792d
Disable ruleset test
GaryJones 5ae2e23
Ruleset tests: update for WPCS 3.0
GaryJones 92e10d3
Ruleset tests: Add label before test runs
GaryJones d6df86d
Enable ruleset tests
GaryJones 1b968b7
Ruleset tests: Update label
GaryJones 5b33691
Add PHPCSExtras dependency
GaryJones ce7d0c4
CI: Use WPCS develop branch for quick test
GaryJones File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -165,7 +165,7 @@ rawurlencode(); // Ok. | |
extract( array( 'a' => 1 ) ); // Error. | ||
$obj->extract(); // Ok. | ||
|
||
// WordPress.PHP.StrictComparisons.LooseComparison | ||
// Universal.Operators.StrictComparisons.LooseComparison | ||
true == $true; // Warning. | ||
false === $true; // Ok. | ||
|
||
|
@@ -546,7 +546,7 @@ str_replace( 'foo', array( 'bar', 'foo' ), 'foobar' ); // Error. | |
|
||
// WordPressVIPMinimum.Security.Underscorejs | ||
echo "<script> | ||
_.templateSettings = { | ||
_.templateSettings = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was this an intentional or accidental trailing whitespace ? I.e. are you changing what's being tested now or not ? (same question for the same change in |
||
interpolate: /\{\{(.+?)\}\}/g" . // Warning. | ||
"}; | ||
</script>"; | ||
|
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't validate anything. It just shows the standards, it doesn't error out if expected standards would not be registered.
Also, this information is already available at the bottom of the "Install Composer dependencies" step as the Composer PHPCS plugin will display it as part of its user facing output.