Skip to content

Instantly share code, notes, and snippets.

@aik099
Created June 4, 2015 08:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aik099/9984962aecd895b1d095 to your computer and use it in GitHub Desktop.
Save aik099/9984962aecd895b1d095 to your computer and use it in GitHub Desktop.
PHP_CodeSniffer tests executed on PHP7
→ /usr/local/php-7.0/bin/php ~/.composer/vendor/bin/phpunit
PHPUnit 4.6.10 by Sebastian Bergmann and contributors.
Configuration read from /mnt/hd/home/alex/web/g/_other/PHP_CodeSniffer/phpunit.xml
................................S...........................SS. 63 / 222 ( 28%)
............................................................... 126 / 222 ( 56%)
.........F......F.............................................. 189 / 222 ( 85%)
......S..........................
Tests generated 594 unique error codes; 324 were fixable (54.55%)
Time: 2.91 seconds, Memory: 26.00Mb
There were 2 failures:
1) Squiz_Tests_WhiteSpace_FunctionClosingBraceSpaceUnitTest::testSniff
[LINE 17] Expected 0 error(s) in FunctionClosingBraceSpaceUnitTest.inc but found 1 error(s). The error(s) found were:
-> Expected 0 blank lines before closing brace of nested function; 1 found (Squiz.WhiteSpace.FunctionClosingBraceSpace.SpacingBeforeNestedClose)
[LINE 21] Expected 1 error(s) in FunctionClosingBraceSpaceUnitTest.inc but found 0 error(s).
[LINE 31] Expected 1 error(s) in FunctionClosingBraceSpaceUnitTest.inc but found 0 error(s).
Fixed version of FunctionClosingBraceSpaceUnitTest.inc does not match expected version in FunctionClosingBraceSpaceUnitTest.inc.fixed; the diff is
--- CodeSniffer/Standards/Squiz/Tests/WhiteSpace/FunctionClosingBraceSpaceUnitTest.inc.fixed
+++ PHP_CodeSniffer
@@ -14,12 +14,10 @@
{
function MyFunction3() {
// Some code goes here.
-
}
function MyFunction4() {
// Some code goes here.
-
}
public function register();
@@ -27,19 +25,15 @@
public function register();
+function foo() {
+}
function foo() {
-
- }
-function foo() {
-
}
function foo() {
-
}
function foo()
{
for ($i = 0; $i < $bar; $i++) {
}//end for
-
}
[LINE 19] Expected 0 error(s) in FunctionClosingBraceSpaceUnitTest.js but found 1 error(s). The error(s) found were:
-> Expected 0 blank lines before closing brace of nested function; 1 found (Squiz.WhiteSpace.FunctionClosingBraceSpace.SpacingBeforeNestedClose)
[LINE 25] Expected 1 error(s) in FunctionClosingBraceSpaceUnitTest.js but found 0 error(s).
[LINE 42] Expected 0 error(s) in FunctionClosingBraceSpaceUnitTest.js but found 1 error(s). The error(s) found were:
-> Expected 0 blank lines before closing brace of nested function; 1 found (Squiz.WhiteSpace.FunctionClosingBraceSpace.SpacingBeforeNestedClose)
[LINE 59] Expected 1 error(s) in FunctionClosingBraceSpaceUnitTest.js but found 0 error(s).
[LINE 72] Expected 0 error(s) in FunctionClosingBraceSpaceUnitTest.js but found 1 error(s). The error(s) found were:
-> Expected 0 blank lines before closing brace of nested function; 1 found (Squiz.WhiteSpace.FunctionClosingBraceSpace.SpacingBeforeNestedClose)
[LINE 88] Expected 0 error(s) in FunctionClosingBraceSpaceUnitTest.js but found 1 error(s). The error(s) found were:
-> Expected 0 blank lines before closing brace of nested function; 1 found (Squiz.WhiteSpace.FunctionClosingBraceSpace.SpacingBeforeNestedClose)
[LINE 98] Expected 0 error(s) in FunctionClosingBraceSpaceUnitTest.js but found 1 error(s). The error(s) found were:
-> Expected 0 blank lines before closing brace of nested function; 1 found (Squiz.WhiteSpace.FunctionClosingBraceSpace.SpacingBeforeNestedClose)
[LINE 104] Expected 0 error(s) in FunctionClosingBraceSpaceUnitTest.js but found 1 error(s). The error(s) found were:
-> Expected 0 blank lines before closing brace of nested function; 1 found (Squiz.WhiteSpace.FunctionClosingBraceSpace.SpacingBeforeNestedClose)
[LINE 116] Expected 0 error(s) in FunctionClosingBraceSpaceUnitTest.js but found 1 error(s). The error(s) found were:
-> Expected 0 blank lines before closing brace of nested function; 1 found (Squiz.WhiteSpace.FunctionClosingBraceSpace.SpacingBeforeNestedClose)
Fixed version of FunctionClosingBraceSpaceUnitTest.js does not match expected version in FunctionClosingBraceSpaceUnitTest.js.fixed; the diff is
--- CodeSniffer/Standards/Squiz/Tests/WhiteSpace/FunctionClosingBraceSpaceUnitTest.js.fixed
+++ PHP_CodeSniffer
@@ -16,20 +16,17 @@
doSomethingElse: function()
{
// Code here.
-
},
};
function FuncFour()
{
// Code here.
-
}
function FuncFive()
{
// Code here.
-
}
function valid()
@@ -39,7 +36,6 @@
namespaces: {}
};
}
-
}
dfx.addEvent(this.rightScroll, 'mousedown', function() {
@@ -57,7 +53,6 @@
AbstractAttributeEditorWidgetType.prototype = {
isActive: function() {
return this.active;
-
},
activate: function(data)
@@ -69,7 +64,6 @@
};
this.active = true;
-
}
};
@@ -86,7 +80,6 @@
});
return x;
-
}
a.prototype = {
@@ -96,13 +89,11 @@
var settings = {
default: ''
};
-
},
b: function()
{
var self = this;
-
}
};
@@ -114,7 +105,6 @@
for (var i = 0; i < paramSelectors.length; i++) {
}//end for
}
-
};
a.prototype = {
/mnt/hd/home/alex/web/g/_other/PHP_CodeSniffer/tests/Standards/AbstractSniffUnitTest.php:172
/mnt/hd/home/alex/web/g/_other/PHP_CodeSniffer/tests/TestSuite.php:48
2) Squiz_Tests_WhiteSpace_MemberVarSpacingUnitTest::testSniff
[LINE 30] Expected 1 error(s) in MemberVarSpacingUnitTest.inc but found 2 error(s). The error(s) found were:
-> Expected 1 blank line before member var; 2 found (Squiz.WhiteSpace.MemberVarSpacing.Incorrect)
-> Expected 1 blank line before member var; 2 found (Squiz.WhiteSpace.MemberVarSpacing.Incorrect)
[LINE 35] Expected 1 error(s) in MemberVarSpacingUnitTest.inc but found 2 error(s). The error(s) found were:
-> Expected 1 blank line before member var; 2 found (Squiz.WhiteSpace.MemberVarSpacing.Incorrect)
-> Expected 1 blank line before member var; 2 found (Squiz.WhiteSpace.MemberVarSpacing.Incorrect)
[LINE 44] Expected 1 error(s) in MemberVarSpacingUnitTest.inc but found 2 error(s). The error(s) found were:
-> Expected 1 blank line before member var; 0 found (Squiz.WhiteSpace.MemberVarSpacing.Incorrect)
-> Expected 1 blank line before member var; 0 found (Squiz.WhiteSpace.MemberVarSpacing.Incorrect)
[LINE 50] Expected 1 error(s) in MemberVarSpacingUnitTest.inc but found 2 error(s). The error(s) found were:
-> Expected 1 blank line before member var; 0 found (Squiz.WhiteSpace.MemberVarSpacing.Incorrect)
-> Expected 1 blank line before member var; 0 found (Squiz.WhiteSpace.MemberVarSpacing.Incorrect)
[LINE 73] Expected 1 error(s) in MemberVarSpacingUnitTest.inc but found 2 error(s). The error(s) found were:
-> Expected 1 blank line before member var; 2 found (Squiz.WhiteSpace.MemberVarSpacing.Incorrect)
-> Expected 1 blank line before member var; 2 found (Squiz.WhiteSpace.MemberVarSpacing.Incorrect)
[LINE 86] Expected 1 error(s) in MemberVarSpacingUnitTest.inc but found 2 error(s). The error(s) found were:
-> Expected 1 blank line before member var; 0 found (Squiz.WhiteSpace.MemberVarSpacing.Incorrect)
-> Expected 1 blank line before member var; 0 found (Squiz.WhiteSpace.MemberVarSpacing.Incorrect)
[LINE 106] Expected 1 error(s) in MemberVarSpacingUnitTest.inc but found 2 error(s). The error(s) found were:
-> Expected 0 blank lines after member var comment; 1 found (Squiz.WhiteSpace.MemberVarSpacing.AfterComment)
-> Expected 0 blank lines after member var comment; 1 found (Squiz.WhiteSpace.MemberVarSpacing.AfterComment)
[LINE 115] Expected 1 error(s) in MemberVarSpacingUnitTest.inc but found 2 error(s). The error(s) found were:
-> Expected 1 blank line before member var; 0 found (Squiz.WhiteSpace.MemberVarSpacing.Incorrect)
-> Expected 1 blank line before member var; 0 found (Squiz.WhiteSpace.MemberVarSpacing.Incorrect)
/mnt/hd/home/alex/web/g/_other/PHP_CodeSniffer/tests/Standards/AbstractSniffUnitTest.php:172
/mnt/hd/home/alex/web/g/_other/PHP_CodeSniffer/tests/TestSuite.php:48
FAILURES!
Tests: 222, Assertions: 69, Failures: 2, Skipped: 4.
alex at prod-mbp in ~/web/g/_other/PHP_CodeSniffer ✘ [git:master|152f32c]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment