-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix multiple test after vipwpcs update
Unused variable was deprecated on this version Automattic/VIP-Coding-Standards#450 Note: users that have this pattern enabled will see a deprecation notice
- Loading branch information
Francisco
committed
Sep 9, 2020
1 parent
22ae5cc
commit 804f916
Showing
19 changed files
with
177 additions
and
24 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
src/main/resources/docs/description/Drupal_Classes_UseGlobalClass.md
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Checks non-namespaced classes are referenced by FQN, not imported. |
1 change: 1 addition & 0 deletions
1
src/main/resources/docs/description/Drupal_Commenting_InlineVariableComment.md
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Checks for the correct usage of inline variable type declarations. |
2 changes: 1 addition & 1 deletion
2
.../description/SlevomatCodingStandard_Arrays_MultiLineArrayEndBracketPlacement.md
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# SlevomatCodingStandard_Arrays_MultiLineArrayEndBracketPlacement | ||
|
||
Enforces reasonable end bracket placement for multiline arrays. | ||
Enforces reasonable end bracket placement for multi-line arrays. |
3 changes: 3 additions & 0 deletions
3
...urces/docs/description/SlevomatCodingStandard_Classes_SuperfluousErrorNaming.md
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# SlevomatCodingStandard_Classes_SuperfluousErrorNaming | ||
|
||
Reports use of superfluous suffix "Error" for errors. |
3 changes: 3 additions & 0 deletions
3
...ources/docs/description/SlevomatCodingStandard_Classes_UnusedPrivateElements.md
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
1 change: 1 addition & 0 deletions
1
...escription/SlevomatCodingStandard_Commenting_DeprecatedAnnotationDeclaration.md
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Commenting: Deprecated Annotation Declaration |
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
10 changes: 10 additions & 0 deletions
10
...scription/SlevomatCodingStandard_ControlStructures_RequireMultiLineCondition.md
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# SlevomatCodingStandard_ControlStructures_RequireMultiLineCondition | ||
|
||
Enforces conditions of `if`, `elseif`, `while` and `do-while` with one or more boolean operators to be splitted to more lines | ||
so each condition part is on its own line. | ||
|
||
Sniff provides the following settings: | ||
|
||
* `minLineLength`: specifies mininum line length to enforce condition to be splitted. Use 0 value to enforce for all conditions, regardless of length. | ||
* `booleanOperatorOnPreviousLine`: boolean operator is placed at the end of previous line when fixing. | ||
* `alwaysSplitAllConditionParts`: require all condition parts to be on its own line - it reports error even if condition is already multi-line but there are some condition parts on the same line. |
8 changes: 8 additions & 0 deletions
8
...cription/SlevomatCodingStandard_ControlStructures_RequireSingleLineCondition.md
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# SlevomatCodingStandard_ControlStructures_RequireSingleLineCondition | ||
|
||
Enforces conditions of `if`, `elseif`, `while` and `do-while` to be on a single line. | ||
|
||
Sniff provides the following settings: | ||
|
||
* `maxLineLength`: specifies max allowed line length. If conditition (and the rest of the line) would fit on it, it's enforced. Use 0 value to enforce for all conditions, regardless of length. | ||
* `alwaysForSimpleConditions`: allows to enforce single line for all simple conditions (i.e no `&&`, `||` or `xor`), regardless of length. |
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
7 changes: 7 additions & 0 deletions
7
...urces/docs/description/SlevomatCodingStandard_Functions_RequireMultiLineCall.md
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SlevomatCodingStandard_Functions_RequireMultiLineCall | ||
|
||
Enforces function call to be splitted to more lines so each parameter is on its own line. | ||
|
||
Sniff provides the following settings: | ||
|
||
* `minLineLength`: specifies min line length to enforce call to be splitted. Use 0 value to enforce for all calls, regardless of length. |
8 changes: 8 additions & 0 deletions
8
...rces/docs/description/SlevomatCodingStandard_Functions_RequireSingleLineCall.md
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# SlevomatCodingStandard_Functions_RequireSingleLineCall | ||
|
||
Enforces function call to be on a single line. | ||
|
||
Sniff provides the following settings: | ||
|
||
* `maxLineLength`: specifies max allowed line length. If call would fit on it, it's enforced. Use 0 value to enforce for all calls, regardless of length. | ||
* `ignoreWithComplexParameter` (defaults to `true`): ignores calls with arrays, closures, arrow functions and nested calls. |
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
1 change: 0 additions & 1 deletion
1
src/main/resources/docs/multiple-tests/vip-wordpress/results.xml
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<checkstyle version="4.3"> | ||
<file name="User.php"> | ||
<error source="WordPressVIPMinimum_Variables_VariableAnalysis" line="9" message="Unused variable `$notUsed`." severity="info" /> | ||
<error source="WordPressVIPMinimum_Security_StaticStrreplace" line="11" message="This code pattern is often used to run a very dangerous shell programs on your server. The code in these files needs to be reviewed, and possibly cleaned." severity="error" /> | ||
</file> | ||
</checkstyle> |
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