Skip to content
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

Switch to Generic.VersionControl.GitMergeConflict #486

Merged
merged 1 commit into from
Jul 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions WordPress-VIP-Go/ruleset-test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -567,12 +567,8 @@ $_SERVER['HTTP_X_FORWARDED_FOR']; // Error.
$_SERVER["REMOTE_ADDR"]; // Error.
// phpcs:enable WordPress.Security.ValidatedSanitizedInput.InputNotValidated,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized

// WordPressVIPMinimum.VersionControl.MergeConflict
function is_prime( $n ) {
if ( 2 === $n ) {
}
//phpcs:ignore Generic.PHP.Syntax.PHPSyntax
======= // Error.
if ( $n % 2 === 0 ) {
}
}
// Generic.VersionControl.GitMergeConflict
?>
<<<<<<< HEAD // Error.

>>>>>>> // Error.
3 changes: 2 additions & 1 deletion WordPress-VIP-Go/ruleset-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@
565 => 1,
566 => 1,
567 => 1,
575 => 1,
572 => 1,
574 => 1,
],
'warnings' => [
4 => 1,
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

15 changes: 6 additions & 9 deletions WordPressVIPMinimum/ruleset-test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -604,15 +604,12 @@ function foo() {
$c = compact( $a, $b ); // Warning x 2.
}

// WordPressVIPMinimum.VersionControl.MergeConflict
function is_prime( $n ) {
if ( 2 === $n ) {
}
//phpcs:ignore Generic.PHP.Syntax.PHPSyntax
======= // Error.
if ( $n % 2 === 0 ) {
}
}
// Generic.VersionControl.GitMergeConflict
?>
<<<<<<< HEAD // Error.

>>>>>>> // Error.
<?php

// Squiz.WhiteSpace.SuperfluousWhitespace
// Error. ?>
Expand Down
5 changes: 3 additions & 2 deletions WordPressVIPMinimum/ruleset-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,9 @@
595 => 1,
596 => 1,
597 => 1,
612 => 1,
618 => 1,
609 => 1,
611 => 1,
615 => 1,
],
'warnings' => [
32 => 1,
Expand Down
1 change: 1 addition & 0 deletions WordPressVIPMinimum/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
</properties>
</rule>

<rule ref="Generic.VersionControl.GitMergeConflict"/>
<rule ref="Generic.NamingConventions.ConstructorName"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<!-- Covers rule: Omitting the closing PHP tag at the end of a file is preferred. -->
Expand Down