Skip to content

Commit 6c82fe5

Browse files
committed
Extra test + changelog for #1326
1 parent 6cd9b30 commit 6c82fe5

6 files changed

+26
-8
lines changed

CodeSniffer/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.inc

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ $hello ='foo';
1313

1414
$sum = $a /* + $b */;
1515
$sum = $a // + $b
16-
;
16+
;
17+
$sum = $a /* + $b
18+
+ $c */ ;

CodeSniffer/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.inc.fixed

+3
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ $hello ='foo';
1313

1414
$sum = $a; /* + $b */
1515
$sum = $a; // + $b
16+
17+
$sum = $a; /* + $b
18+
+ $c */

CodeSniffer/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ alert('hi');
1919
var sum = a /* + b */;
2020

2121
var sum = a // +b
22-
;
22+
;
23+
24+
var sum = a /* +b
25+
+ c */ ;

CodeSniffer/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.js.fixed

+4
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ alert('hi');
1919
var sum = a; /* + b */
2020

2121
var sum = a; // +b
22+
23+
24+
var sum = a; /* +b
25+
+ c */

CodeSniffer/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.php

+8-6
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,15 @@ public function getErrorList($testFile='SemicolonSpacingUnitTest.inc')
4747
switch ($testFile) {
4848
case 'SemicolonSpacingUnitTest.inc':
4949
return array(
50-
3 => 1,
51-
4 => 1,
52-
5 => 2,
53-
6 => 1,
54-
8 => 1,
55-
9 => 1,
50+
3 => 1,
51+
4 => 1,
52+
5 => 2,
53+
6 => 1,
54+
8 => 1,
55+
9 => 1,
5656
14 => 1,
5757
16 => 1,
58+
18 => 1,
5859
);
5960
break;
6061
case 'SemicolonSpacingUnitTest.js':
@@ -67,6 +68,7 @@ public function getErrorList($testFile='SemicolonSpacingUnitTest.inc')
6768
13 => 1,
6869
19 => 1,
6970
22 => 1,
71+
25 => 1,
7072
);
7173
break;
7274
default:

package.xml

+4
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
5555
- Fixed an error where a nullable type character was detected as an inline then token
5656
-- A new T_NULLABLE token has been added to represent the ? nullable type character
5757
-- Thanks to Jaroslav Hanslík for the patch
58+
- Squiz.WhiteSpace.SemicolonSpacing no longer removes comments while fixing the placement of semicolons
59+
-- Thanks to Algirdas Gurevicius for the patch
5860
- Fixed bug #1230 : JS tokeniser incorrectly tokenises bitwise shifts as comparison
5961
-- Thanks to Ryan McCue for the patch
6062
- Fixed bug #1237 : Uninitialized string offset in PHP Tokenizer on PHP 5.2
@@ -2287,7 +2289,9 @@ http://pear.php.net/dtd/package-2.0.xsd">
22872289
<tasks:replace from="@package_version@" to="version" type="package-info" />
22882290
</file>
22892291
<file baseinstalldir="PHP" name="SemicolonSpacingUnitTest.inc" role="test" />
2292+
<file baseinstalldir="PHP" name="SemicolonSpacingUnitTest.inc.fixed" role="test" />
22902293
<file baseinstalldir="PHP" name="SemicolonSpacingUnitTest.js" role="test" />
2294+
<file baseinstalldir="PHP" name="SemicolonSpacingUnitTest.js.fixed" role="test" />
22912295
<file baseinstalldir="PHP" name="SemicolonSpacingUnitTest.php" role="test">
22922296
<tasks:replace from="@package_version@" to="version" type="package-info" />
22932297
</file>

0 commit comments

Comments
 (0)